Back to notes
STAC SPEC
STAC SPEC

2024-09-30 16:33

Status: #nv5

Tags: [[ehydro]]

STAC SPEC

The SpatioTemporal Asset Catalog (STAC) specification was designed to establish a standard, unified language to talk about geospatial data, allowing it to be more easily searchable and queryable.

STAC has been designed to be simple, flexible, and extensible. STAC is a network of JSON files that reference other JSON files, with each JSON file adhering to a specific core specification depending on which STAC component it is describing. This core JSON format can also be customized to fit differing needs, making the STAC specification highly flexible and adaptable.

Therefore, if the STAC specification seems ‘light’, that is because it is light— by design. Through this flexibility, different domains and tools can easily utilize the STAC specification and make it their own.

The Extensions section of the spec is where the community collaborates on more detail about specific data types and new functionality.

The full STAC specification can be found in markdown pages on GitHub. The content on this site will give you a strong foundation in STAC through basic theoretical knowledge and practical experience with STAC in this Tutorials section. If you are looking for a more thorough and technical reference, visit the STAC Specification on GitHub.

ESRI Stac Spec UI: https://www.esri.com/arcgis-blog/products/arcgis-pro/imagery/introduction-to-the-stac-ui-in-arcgis-pro/?srsltid=AfmBOorP9eWjapUSZI_OgYMtQrg0HXFHAKegTPv1dF7POZD6wMpOJhXf

QGIS Stac Spec Plugin: https://www.youtube.com/watch?v=Jp9xiAGQw6w

Free Front End For STAC

Extensions

Projection extension

Field NameTypeDescription
proj:codestring|nullAuthority and specific code of the data source (e.g., EPSG:3857)
proj:wkt2string|nullWKT2 string representing the Coordinate Reference System (CRS) that the proj:geometry and proj:bbox fields represent
proj:projjsonPROJJSON Object|nullPROJJSON object representing the Coordinate Reference System (CRS) that the proj:geometry and proj:bbox fields represent
proj:geometryGeoJSON Geometry ObjectDefines the footprint of this Item.
proj:bbox[number]Bounding box of the Item in the asset CRS in 2 or 3 dimensions.
proj:centroidCentroid ObjectCoordinates representing the centroid of the Item (in lat/long)
proj:shape[integer]Number of pixels in Y and X directions for the default grid
proj:transform[number]The affine transformation coefficients for the default grid

Point Cloud extension

Field NameTypeDescription
pc:countintegerREQUIRED. The number of points in the Item.
pc:typestringREQUIRED. Phenomenology type for the point cloud. Possible valid values might include lidareopcradarsonar, or other
pc:schemas[Schema Object]A sequential array of Items that define the dimensions and their types.
pc:densitynumberNumber of points per square unit area.
pc:statistics[Stats Object]A sequential array of Items mapping to pc:schemas defines per-channel statistics.

Version extension

TypeDescription
latest-versionThis link points to a STAC resource containing the latest (e.g., current) version. A maximum of one link can use this relation type per STAC resource.
predecessor-versionOne or multiple links can point to STAC resources that are predecessor versions in the version history.
successor-versionOne or multiple links can point to STAC resources that are successor versions in the version history.
version-historyThis link points to a version history or changelog. This can be for example a Markdown file with the corresponding media type or a STAC Catalog or Collection.

PySTAC used for building or viewing catalogs

Example on how to visualize data using STAC:

with urllib.request.urlopen(stac_url) as url:
    data = json.loads(url.read().decode())
pprint(data, depth=1)

Example downloader connected to STAC:

References