GetSTACInfo

サマリー

Retrieves information from a SpatioTemporal Asset Catalog (STAC) URL.

This function retrieves and parses information from a given STAC URL. It supports the STAC Catalog, Collection, Item, and ItemCollection objects.

説明

This function gathers STAC information, which can be used to better understand what to pass or query when using the Raster object's fromSTACItem method, and the RasterCollection object's fromSTACAPI and fromSTACCatalog methods.

構文

GetSTACInfo (stac_url, {verbose})
パラメーター説明データ タイプ
stac_url

The URL of the STAC resource.

String
verbose

Specifies the level of information returned. If set to True, detailed information is returned. If set to False, only essential information is returned.

(デフォルト値は次のとおりです False)

Boolean
戻り値
データ タイプ説明
Dictionary

The parsed information from the STAC URL as a dictionary.

コードのサンプル

GetSTACInfo example 1

Retrieve detailed information from a STAC API (Planetary Computer).

import arcpy
stac_info = arcpy.GetSTACInfo(
    "https://planetarycomputer.microsoft.com/api/stac/v1", verbose=True
)
print(stac_info)
GetSTACInfo example 2

Retrieve essential information from a STAC Collection (Landsat C2-L2 collection on Planetary Computer).

import arcpy
stac_info = arcpy.GetSTACInfo(
    "https://planetarycomputer.microsoft.com/api/stac/v1/collections/landsat-c2-l2",
    verbose=False
)
print(stac_info)
GetSTACInfo example 3

Retrieve essential information from a STAC Item (NAIP data on Planetary Computer).

import arcpy
    stac_info = arcpy.GetSTACInfo(
    "https://planetarycomputer.microsoft.com/api/stac/v1/collections/naip/items/wa_m_4712125_sw_10_060_20191029_20191217"
)
print(stac_info)
GetSTACInfo example 4

Retrieve detailed information from an ItemCollection (NAIP data on Earth Search).

import arcpy
stac_info = arcpy.GetSTACInfo(
    "https://earth-search.aws.element84.com/v1/collections/naip/items", verbose=True
)
print(stac_info)