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 Name | Type | Description |
|---|---|---|
| proj:code | string|null | Authority and specific code of the data source (e.g., EPSG:3857) |
| proj:wkt2 | string|null | WKT2 string representing the Coordinate Reference System (CRS) that the proj:geometry and proj:bbox fields represent |
| proj:projjson | PROJJSON Object|null | PROJJSON object representing the Coordinate Reference System (CRS) that the proj:geometry and proj:bbox fields represent |
| proj:geometry | GeoJSON Geometry Object | Defines the footprint of this Item. |
| proj:bbox | [number] | Bounding box of the Item in the asset CRS in 2 or 3 dimensions. |
| proj:centroid | Centroid Object | Coordinates 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 Name | Type | Description |
|---|---|---|
| pc:count | integer | REQUIRED. The number of points in the Item. |
| pc:type | string | REQUIRED. Phenomenology type for the point cloud. Possible valid values might include lidar, eopc, radar, sonar, or other |
| pc:schemas | [Schema Object] | A sequential array of Items that define the dimensions and their types. |
| pc:density | number | Number 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
| Type | Description |
|---|---|
| latest-version | This 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-version | One or multiple links can point to STAC resources that are predecessor versions in the version history. |
| successor-version | One or multiple links can point to STAC resources that are successor versions in the version history. |
| version-history | This 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
- https://github.com/stac-extensions/stac-extensions.github.io
- https://pystac.readthedocs.io/en/latest/tutorials/adding-new-and-custom-extensions.html
- https://pystac.readthedocs.io/en/stable/
- https://github.com/podaac/data-subscriber/blob/main/subscriber/podaac_data_downloader.py
- https://docs.digitalearthafrica.org/en/latest/sandbox/notebooks/Frequently_used_code/Downloading_data_with_STAC.html