Scenes - Search Features
按集合 ID、bbox、相交几何图形、开始和结束日期时间搜索 STAC 功能。
POST /scenes/stac-collections/{collectionId}:search?api-version=2023-07-01-preview
POST /scenes/stac-collections/{collectionId}:search?maxpagesize={maxpagesize}&skip={skip}&api-version=2023-07-01-preview
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
collection
|
path | True |
要搜索的集合 ID。 |
|
api-version
|
query | True |
string |
请求的 API 版本 |
maxpagesize
|
query |
integer (int32) minimum: 1maximum: 100 |
所需的最大功能数(含)。 最小值 = 1,最大值 = 100,默认值 = 10。 |
|
skip
|
query |
integer (int32) minimum: 1maximum: 2147483647 |
跳过令牌以获取下一组结果。 |
请求头
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
Authorization | True |
string |
请为授权的 API 调用提供有效的持有者令牌。 请注意,如果之前尝试了未经身份验证的调用,可能需要清除浏览器缓存。 |
请求正文
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
endDateTime | True |
string (date-time) |
要在其中搜索功能的时间间隔的结束日期/时间。 |
startDateTime | True |
string (date-time) |
要在其中搜索功能的时间间隔的开始日期时间。 |
bbox |
number[] (double) |
仅选择了与边界框相交的几何图形的特征。 边界框以四个数字的形式提供。 值的坐标引用系统为 WGS84 经度/纬度。 |
|
credentials |
clientId clientSecret 身份验证的 OAuthClientCredentials。 |
||
featureIds |
string[] |
要返回的功能 ID 的数组。 |
|
intersects | GeoJsonObject: |
GeoJSON (有关详细信息:https://geojson.org/)。 注意:坐标应采用 [经度, 纬度] 格式。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
成功 |
|
Other Status Codes |
错误 标头 x-ms-error-code: string |
安全性
Authorization
请为授权的 API 调用提供有效的持有者令牌。 请注意,如果之前尝试了未经身份验证的调用,可能需要清除浏览器缓存。
类型:
apiKey
在:
header
示例
Scenes_SearchFeatures
示例请求
POST /scenes/stac-collections/Sentinel_2_L2A:search?maxpagesize=2&skip=15&api-version=2023-07-01-preview
{
"credentials": {
"kind": "OAuthClientCredentials",
"clientId": "string",
"clientSecret": {
"keyVaultUri": "https://<keyvaultname>.vault.azure.net/",
"keyName": "string",
"keyVersion": "string"
}
},
"startDateTime": "2022-01-26T14:53:23.825Z",
"endDateTime": "2023-01-26T14:53:23.825Z",
"intersects": {
"type": "Polygon",
"coordinates": [
[
[
7.662878883920398,
47.845905986476225
],
[
7.687601396600625,
46.85818510350441
],
[
9.12804406196848,
46.86563725992561
],
[
9.130456971517189,
47.85361872819965
],
[
7.662878883920398,
47.845905986476225
]
]
]
}
}
示例响应
{
"features": [
{
"stacVersion": "0.9.0",
"stacExtensions": [
"eo",
"projection"
],
"id": "S2B_MSIL2A_20230121T102239_N0509_R065_T32UMU_20230121T113700",
"type": "Feature",
"geometry": {
"type": "MultiPolygon",
"crs": {
"type": "name",
"properties": {
"name": "urn:ogc:def:crs:OGC::CRS84"
}
},
"coordinates": [
[
[
[
8.463630109874195,
48.75175579972667
],
[
8.09718328627216,
47.761624720018254
],
[
9.130235487170578,
47.76510167563715
],
[
9.13276898152643,
48.75292752793247
],
[
8.463630109874195,
48.75175579972667
]
]
]
]
},
"bbox": [
8.09718328627216,
47.761624720018254,
9.13276898152643,
48.75292752793247
],
"properties": {
"datetime": "2023-01-21T10:27:32Z",
"platform": "sentinel-2b",
"instruments": [
"msi"
],
"constellation": "sentinel-2",
"eo:gsd": 10,
"eo:cloud_cover": 80.46,
"eo:bands": [
{
"name": "B01",
"common_name": "coastal",
"center_wavelength": 0.4427,
"full_width_half_max": 0.021
},
{
"name": "B02",
"common_name": "blue",
"center_wavelength": 0.4924,
"full_width_half_max": 0.066
},
{
"name": "B03",
"common_name": "green",
"center_wavelength": 0.5598,
"full_width_half_max": 0.036
},
{
"name": "B04",
"common_name": "red",
"center_wavelength": 0.6646,
"full_width_half_max": 0.031
},
{
"name": "B05",
"center_wavelength": 0.7041,
"full_width_half_max": 0.015
},
{
"name": "B06",
"center_wavelength": 0.7405,
"full_width_half_max": 0.015
},
{
"name": "B07",
"center_wavelength": 0.7828,
"full_width_half_max": 0.02
},
{
"name": "B08",
"common_name": "nir",
"center_wavelength": 0.8328,
"full_width_half_max": 0.106
},
{
"name": "B8A",
"common_name": "nir08",
"center_wavelength": 0.8647,
"full_width_half_max": 0.021
},
{
"name": "B09",
"common_name": "nir09",
"center_wavelength": 0.9451,
"full_width_half_max": 0.02
},
{
"name": "B11",
"common_name": "swir16",
"center_wavelength": 1.6137,
"full_width_half_max": 0.091
},
{
"name": "B12",
"common_name": "swir22",
"center_wavelength": 2.2024,
"full_width_half_max": 0.175
}
],
"proj:epsg": 32632,
"proj:bbox": [
399960,
5290200,
509760,
5400000
],
"proj:geometry": {
"type": "MultiPolygon",
"crs": {
"type": "name",
"properties": {
"name": "urn:ogc:def:crs:EPSG::32632"
}
},
"coordinates": [
[
[
[
460574.0276522319,
5399999.00024835
],
[
432344.5418597979,
5290201.00021934
],
[
509758.99999999994,
5290201.000219454
],
[
509759,
5399999.000248388
],
[
460574.0276522319,
5399999.00024835
]
]
]
]
}
},
"links": [
{
"href": "https://services.sentinel-hub.com/api/v1/catalog/collections/sentinel-2-l2a/items/S2B_MSIL2A_20230121T102239_N0509_R065_T32UMU_20230121T113700",
"rel": "self",
"type": "application/json"
},
{
"href": "https://services.sentinel-hub.com/api/v1/catalog/collections/sentinel-2-l2a",
"rel": "parent"
},
{
"href": "https://scihub.copernicus.eu/dhus/odata/v1/Products('ece4b170-065b-4d3c-a005-9c20b8f383fe')/$value",
"rel": "derived_from",
"title": "scihub download"
}
],
"assets": {
"thumbnail": {
"href": "https://roda.sentinel-hub.com/sentinel-s2-l1c/tiles/32/T/MT/2023/1/4/0/preview.jpg",
"title": "thumbnail",
"type": "image/png"
}
}
},
{
"stacVersion": "0.9.0",
"stacExtensions": [
"eo",
"projection"
],
"id": "S2B_MSIL2A_20230121T102239_N0509_R065_T32UNU_20230121T113700",
"type": "Feature",
"geometry": {
"type": "MultiPolygon",
"crs": {
"type": "name",
"properties": {
"name": "urn:ogc:def:crs:OGC::CRS84"
}
},
"coordinates": [
[
[
[
8.999741508947052,
48.753004006975516
],
[
8.999746441483957,
47.76517556280485
],
[
10.46477378099951,
47.7558278091967
],
[
10.493255611543965,
48.743328406398774
],
[
8.999741508947052,
48.753004006975516
]
]
]
]
},
"bbox": [
8.999741508947052,
47.7558278091967,
10.493255611543965,
48.753004006975516
],
"properties": {
"datetime": "2023-01-21T10:27:28Z",
"platform": "sentinel-2b",
"instruments": [
"msi"
],
"constellation": "sentinel-2",
"eo:gsd": 10,
"eo:cloud_cover": 95.46,
"eo:bands": [
{
"name": "B01",
"common_name": "coastal",
"center_wavelength": 0.4427,
"full_width_half_max": 0.021
},
{
"name": "B02",
"common_name": "blue",
"center_wavelength": 0.4924,
"full_width_half_max": 0.066
},
{
"name": "B03",
"common_name": "green",
"center_wavelength": 0.5598,
"full_width_half_max": 0.036
},
{
"name": "B04",
"common_name": "red",
"center_wavelength": 0.6646,
"full_width_half_max": 0.031
},
{
"name": "B05",
"center_wavelength": 0.7041,
"full_width_half_max": 0.015
},
{
"name": "B06",
"center_wavelength": 0.7405,
"full_width_half_max": 0.015
},
{
"name": "B07",
"center_wavelength": 0.7828,
"full_width_half_max": 0.02
},
{
"name": "B08",
"common_name": "nir",
"center_wavelength": 0.8328,
"full_width_half_max": 0.106
},
{
"name": "B8A",
"common_name": "nir08",
"center_wavelength": 0.8647,
"full_width_half_max": 0.021
},
{
"name": "B09",
"common_name": "nir09",
"center_wavelength": 0.9451,
"full_width_half_max": 0.02
},
{
"name": "B11",
"common_name": "swir16",
"center_wavelength": 1.6137,
"full_width_half_max": 0.091
},
{
"name": "B12",
"common_name": "swir22",
"center_wavelength": 2.2024,
"full_width_half_max": 0.175
}
],
"proj:epsg": 32632,
"proj:bbox": [
499980,
5290200,
609780,
5400000
],
"proj:geometry": {
"type": "MultiPolygon",
"crs": {
"type": "name",
"properties": {
"name": "urn:ogc:def:crs:EPSG::32632"
}
},
"coordinates": [
[
[
[
499981,
5399999.000248392
],
[
499981,
5290201.000219455
],
[
609779.0000024929,
5290201.000219092
],
[
609779.0000028561,
5399999.000247997
],
[
499981,
5399999.000248392
]
]
]
]
}
},
"links": [
{
"href": "https://services.sentinel-hub.com/api/v1/catalog/collections/sentinel-2-l2a/items/S2B_MSIL2A_20230121T102239_N0509_R065_T32UNU_20230121T113700",
"rel": "self",
"type": "application/json"
},
{
"href": "https://services.sentinel-hub.com/api/v1/catalog/collections/sentinel-2-l2a",
"rel": "parent"
},
{
"href": "https://scihub.copernicus.eu/dhus/odata/v1/Products('986643df-22f1-4c6b-be20-7db66ecbc699')/$value",
"rel": "derived_from",
"title": "scihub download"
}
],
"assets": {
"thumbnail": {
"href": "https://roda.sentinel-hub.com/sentinel-s2-l1c/tiles/32/T/MT/2023/1/4/0/preview.jpg",
"title": "thumbnail",
"type": "image/png"
}
}
}
],
"nextLink": "https://{{resourceName}}.farmbeats.azure.net//scenes/stac-collections/Sentinel_2_L2A:search?api-version={{apiVersion}}&maxpagesize=2&skip=17"
}
定义
AuthCredentialsKind
CredentialTypeEnum。
值 | 说明 |
---|---|
ApiKeyAuthCredentials | |
OAuthClientCredentials |
collectionId
要搜索的集合 ID。
值 | 说明 |
---|---|
Sentinel_2_L1C | |
Sentinel_2_L2A |
Error
Azure AgPlatform 服务中的错误。
名称 | 类型 | 说明 |
---|---|---|
code |
string minLength: 1 |
服务器定义的错误代码集。 |
details |
Error[] |
导致此报告错误的特定错误的详细信息数组。 |
innererror |
包含错误列表的内部错误。请参阅 innerError 参考文档 https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object。 |
|
message |
string minLength: 1 |
错误的人工可读表示形式。 |
target |
string |
错误的目标。 |
ErrorResponse
Azure AgPlatform 服务的错误响应。 请参阅 errorResponse 参考文档 https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses。
名称 | 类型 | 说明 |
---|---|---|
error |
Azure AgPlatform 服务中的错误。 |
|
traceId |
string |
唯一跟踪 ID。 |
GeoJsonObjectType
GeoJSON 对象类型。
值 | 说明 |
---|---|
MultiPolygon | |
Point | |
Polygon |
InnerError
包含错误列表的内部错误。请参阅 innerError 参考文档 https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
包含的错误提供的特定错误代码。 |
innererror |
包含错误列表的内部错误。请参阅 innerError 参考文档 https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object。 |
KeyVaultProperties
密钥保管库的属性。
名称 | 类型 | 说明 |
---|---|---|
keyName |
string minLength: 1 |
Key Vault 密钥的名称。 |
keyVaultUri |
string minLength: 1 |
密钥保管库的 URI。 |
keyVersion |
string minLength: 1 |
Key Vault 密钥的版本。 |
MultiPolygon
MultiPolygon 几何图形。
名称 | 类型 | 说明 |
---|---|---|
coordinates |
number[] (double) |
获取或设置 GeoJSON 对象的坐标。 它必须是多边形数组,每个多边形都包含线性环的列表。 对于具有以上一个环的多边形,第一个必须是外环,任何其他环都必须是内部环。 |
type | string: |
GeoJSON 对象类型。 |
OAuthClientCredentials
clientId clientSecret 身份验证的 OAuthClientCredentials。
名称 | 类型 | 说明 |
---|---|---|
clientId |
string minLength: 1 |
与提供程序关联的 ClientId。 |
clientSecret |
密钥保管库的属性。 |
|
kind | string: |
CredentialTypeEnum。 |
Point
点几何图形。
名称 | 类型 | 说明 |
---|---|---|
coordinates |
number[] (double) |
获取或设置此点的坐标。 它必须是 2D 或 3D 系统的 2 或 3 个元素的数组。 |
type | string: |
GeoJSON 对象类型。 |
Polygon
多边形几何图形。
名称 | 类型 | 说明 |
---|---|---|
coordinates |
number[] (double) |
获取或设置 GeoJSON 对象的类型。 它必须是线性环坐标数组的数组。 对于具有以上一个环的多边形,第一个必须是外环,任何其他环都必须是内部环。 |
type | string: |
GeoJSON 对象类型。 |
SearchFeaturesQuery
搜索 stac Features 参数。
名称 | 类型 | 说明 |
---|---|---|
bbox |
number[] (double) |
仅选择了与边界框相交的几何图形的特征。 边界框以四个数字的形式提供。 值的坐标引用系统为 WGS84 经度/纬度。 |
credentials |
clientId clientSecret 身份验证的 OAuthClientCredentials。 |
|
endDateTime |
string (date-time) |
要在其中搜索功能的时间间隔的结束日期/时间。 |
featureIds |
string[] |
要返回的功能 ID 的数组。 |
intersects | GeoJsonObject: |
GeoJSON (有关详细信息:https://geojson.org/)。 注意:坐标应采用 [经度, 纬度] 格式。 |
startDateTime |
string (date-time) |
要在其中搜索功能的时间间隔的开始日期时间。 |
SearchFeaturesResponse
分页响应包含用于获取下一组结果的功能和下一属性的列表。
名称 | 类型 | 说明 |
---|---|---|
features |
功能列表。 |
|
nextLink |
string |
使用相同筛选器执行 POST 请求的 URL,以获取下一组功能。 |
StacFeature
STAC 功能(项)的架构。 请参阅规范:https://github.com/radiantearth/stac-spec/blob/v1.0.0-beta.2/item-spec/item-spec.md#item-fields。
名称 | 类型 | 说明 |
---|---|---|
assets |
<string,
Stac |
资产对象的字典,每个对象都有唯一键。 |
bbox |
number[] (double) |
功能的边界框。 |
collection |
string |
此功能引用的 STAC 集合的 ID。 |
geometry |
object |
定义此项所表示的资产的完整占用空间。 其 GeoJSON 几何图形。 |
id |
string minLength: 1 |
提供程序标识符。 数据提供程序的全局唯一 ID。 |
links |
指向资源和相关 URL 的链接对象列表。 |
|
properties |
object |
项的其他元数据字典。 |
stacExtensions |
string[] |
功能实现的扩展列表。 |
stacVersion |
string minLength: 1 |
功能实现的 STAC 版本。 |
type |
string minLength: 1 |
GeoJSON 对象的类型。 该值始终是功能。 |
StacFeatureAsset
STAC 功能资产的架构。 请参阅规范:https://github.com/radiantearth/stac-spec/blob/v1.0.0-beta.2/item-spec/item-spec.md#asset-object。
名称 | 类型 | 说明 |
---|---|---|
description |
string |
提供其他详细信息(例如处理或创建资产的方式)的说明。 |
href |
string minLength: 1 |
链接到资产对象。 |
roles |
string[] |
资产的语义角色,类似于链接中的 rel 用法。 |
title |
string |
客户端和用户的显示标题。 |
type |
string |
资产的媒体类型。 |
StacFeatureLink
Link 对象描述此功能与其他实体的关系。 请参阅规范:https://github.com/radiantearth/stac-spec/blob/v1.0.0-beta.2/item-spec/item-spec.md#link-object。
名称 | 类型 | 说明 |
---|---|---|
href |
string minLength: 1 |
URL 格式的实际链接。 |
rel |
string minLength: 1 |
当前文档与链接文档之间的关系。 |
title |
string |
在链接的呈现显示中使用的人工可读标题。 |
type |
string |
引用实体的媒体类型。 |