Scenes - Search Items
依集合標識碼、bbox、交集幾何、開始和結束日期時間搜尋 STAC 專案。
POST {endpoint}/scenes/stac-collections/{collectionId}:search?api-version=2023-11-01-preview
POST {endpoint}/scenes/stac-collections/{collectionId}:search?maxpagesize={maxpagesize}&skip={skip}&api-version=2023-11-01-preview
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
collection
|
path | True |
string |
要搜尋的集合標識碼。 可用的值為:sentinel-2-l2a、sentinel-2-l1c。 |
endpoint
|
path | True |
string uri |
命名空間的主機名,例如 admaInstanceName.farmbeats.azure.net |
api-version
|
query | True |
string |
要求的 API 版本 |
maxpagesize
|
query |
integer int32 |
內含) (所需的項目數目上限。 最小值 = 1,最大值 = 100,預設值 = 10。 |
|
skip
|
query |
integer int32 |
略過令牌以取得下一組結果。 |
要求標頭
名稱 | 必要 | 類型 | Description |
---|---|---|---|
Authorization | True |
string |
請為授權的 API 呼叫提供有效的持有人令牌。 請注意,如果您之前嘗試了未驗證的呼叫,您可能需要清除瀏覽器快取。 |
要求本文
名稱 | 必要 | 類型 | Description |
---|---|---|---|
endDateTime | True |
string |
要搜尋專案之時間間隔的結束日期時間。 |
startDateTime | True |
string |
要在其中搜尋 Items 之時間間隔的開始日期時間。 |
bbox |
number[] |
只會選取幾何與周框方塊交集的專案。 周框方塊會以四個數位的形式提供。 值的座標參考系統是 WGS84 經度/緯度。 |
|
credentials |
clientId clientSecret 驗證的 OAuthClientCredentials。 |
||
intersects | GeoJsonObject: |
GeoJSON (如需詳細資訊: https://geojson.org/) 。 注意:坐標必須是 [經度、緯度] 格式。 |
|
itemIds |
string[] |
要傳回的專案標識碼陣列。 |
回應
名稱 | 類型 | Description |
---|---|---|
200 OK |
成功 |
|
Other Status Codes |
[錯誤] 標題 x-ms-error-code: string |
安全性
Authorization
請為授權的 API 呼叫提供有效的持有人令牌。 請注意,如果您之前嘗試了未驗證的呼叫,您可能需要清除瀏覽器快取。
類型:
apiKey
位於:
header
範例
Scenes_SearchItems
範例要求
POST {endpoint}/scenes/stac-collections/sentinel-2-l2a:search?api-version=2023-11-01-preview
{
"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
]
]
]
}
}
範例回覆
{
"items": [
{
"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-collection/{{collectionId}}:search?api-version={{apiVersion}}&skipToken=%5b%7b%22token%22%3a%22%2bRID%3a%7e23TRC%3a10%23ISA%3d%22%2c%22range%22%3a%7b%22min%22%3a%22%22%2c%22max%22%3a%22FF%22%7d%7d%5d"
}
定義
AuthCredentialsKind
支援的不同類型的 AuthCredentials 列舉。
名稱 | 類型 | Description |
---|---|---|
ApiKeyAuthCredentials |
string |
|
OAuthClientCredentials |
string |
Error
來自 Azure AgPlatform 服務的錯誤。
名稱 | 類型 | Description |
---|---|---|
code |
string |
伺服器定義的錯誤碼集。 |
details |
Error[] |
導致此錯誤之特定錯誤的詳細數據陣列。 |
innererror |
包含錯誤清單的內部錯誤。請參閱 https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object InnerError 參考檔。 |
|
message |
string |
人類可閱讀的錯誤表示法。 |
target |
string |
錯誤的目標。 |
ErrorResponse
來自 Azure AgPlatform 服務的錯誤回應。 請參閱 https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses ErrorResponse 參考檔。
名稱 | 類型 | Description |
---|---|---|
error |
來自 Azure AgPlatform 服務的錯誤。 |
|
traceId |
string |
唯一追蹤標識碼。 |
GeoJsonObjectType
GeoJSON 物件類型。
名稱 | 類型 | Description |
---|---|---|
MultiPolygon |
string |
|
Point |
string |
|
Polygon |
string |
InnerError
包含錯誤清單的內部錯誤。請參閱 https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object InnerError 參考檔。
名稱 | 類型 | Description |
---|---|---|
code |
string |
包含的錯誤所提供的特定錯誤碼。 |
innererror |
包含錯誤清單的內部錯誤。請參閱 https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object InnerError 參考檔。 |
KeyVaultProperties
金鑰保存庫的屬性。
名稱 | 類型 | Description |
---|---|---|
keyName |
string |
金鑰保存庫 鍵的名稱。 |
keyVaultUri |
string |
金鑰保存庫的 URI。 |
keyVersion |
string |
金鑰保存庫 金鑰的版本。 |
MultiPolygon
MultiPolygon 幾何。
名稱 | 類型 | Description |
---|---|---|
coordinates |
number[] |
取得或設定 GeoJSON 物件的座標。 它必須是多邊形的陣列,每個多邊形都包含線性環形的清單。 對於具有多個環形的多邊形,第一個必須是外部環形,而任何其他必須是內部環形。 |
type | string: |
GeoJSON 物件類型。 |
OAuthClientCredentials
clientId clientSecret 驗證的 OAuthClientCredentials。
名稱 | 類型 | Description |
---|---|---|
clientId |
string |
與提供者相關聯的 ClientId。 |
clientSecret |
金鑰保存庫的屬性。 |
|
kind | string: |
支援的不同類型的 AuthCredentials 列舉。 |
Point
點幾何。
名稱 | 類型 | Description |
---|---|---|
coordinates |
number[] |
取得或設定這個點的座標。 它必須是 2D 或 3D 系統的 2 或 3 個項目陣列。 |
type | string: |
GeoJSON 物件類型。 |
Polygon
多邊形幾何。
名稱 | 類型 | Description |
---|---|---|
coordinates |
number[] |
取得或設定 GeoJSON 物件的類型。 它必須是線性環形座標數位的陣列。 對於具有多個環形的多邊形,第一個必須是外部環形,而任何其他必須是內部環形。 |
type | string: |
GeoJSON 物件類型。 |
SearchItemsQuery
搜尋 stac Items 參數。
名稱 | 類型 | Description |
---|---|---|
bbox |
number[] |
只會選取幾何與周框方塊交集的專案。 周框方塊會以四個數位的形式提供。 值的座標參考系統是 WGS84 經度/緯度。 |
credentials |
clientId clientSecret 驗證的 OAuthClientCredentials。 |
|
endDateTime |
string |
要搜尋專案之時間間隔的結束日期時間。 |
intersects | GeoJsonObject: |
GeoJSON (如需詳細資訊: https://geojson.org/) 。 注意:坐標必須是 [經度、緯度] 格式。 |
itemIds |
string[] |
要傳回的專案標識碼陣列。 |
startDateTime |
string |
要在其中搜尋 Items 之時間間隔的開始日期時間。 |
SearchItemsResponse
分頁回應包含專案清單和下一個屬性,可取得下一組結果。
名稱 | 類型 | Description |
---|---|---|
items |
Stac |
項目清單。 |
nextLink |
string |
使用相同篩選來執行 POST 要求的 URL,以取得下一組專案。 |
StacItem
STAC 項目的架構。 請參閱規格: https://github.com/radiantearth/stac-spec/blob/v1.0.0-beta.2/item-spec/item-spec.md#item-fields。
名稱 | 類型 | Description |
---|---|---|
assets |
<string,
Stac |
資產物件的字典,每個物件都有唯一索引鍵。 |
bbox |
number[] |
專案的周框方塊。 |
collection |
string |
此 Stac 項目參考之 STAC 集合的標識碼。 |
geometry |
object |
定義此專案所代表資產的完整使用量。 其 GeoJSON 幾何。 |
id |
string |
提供者標識碼。 數據提供者的全域唯一標識符。 |
links |
資源和相關 URL 的連結物件清單。 |
|
properties |
object |
專案其他元數據的字典。 |
stacExtensions |
string[] |
Stac Item 實作的延伸模組清單。 |
stacVersion |
string |
Stac Item 所實作的 STAC 版本。 |
type |
string |
GeoJSON 對象的類型。 其值一律為Feature。 |
StacItemAsset
STAC 項目資產的架構。 請參閱規格: https://github.com/radiantearth/stac-spec/blob/v1.0.0-beta.2/item-spec/item-spec.md#asset-object。
名稱 | 類型 | Description |
---|---|---|
description |
string |
提供其他詳細數據的資產描述,例如其處理方式或建立方式。 |
href |
string |
連結至資產物件。 |
roles |
string[] |
資產的語意角色,類似於在連結中使用 rel。 |
title |
string |
用戶端和用戶的顯示標題。 |
type |
string |
資產的媒體類型。 |
StacItemLink
Link 物件描述此 Stac Item 與另一個實體的關聯性。 請參閱規格: https://github.com/radiantearth/stac-spec/blob/v1.0.0-beta.2/item-spec/item-spec.md#link-object。
名稱 | 類型 | Description |
---|---|---|
href |
string |
URL 格式的實際連結。 |
rel |
string |
目前文件與連結檔之間的關聯性。 |
title |
string |
要用於連結轉譯顯示中的人類可讀標題。 |
type |
string |
參考實體的媒體類型。 |