hydromodpy.results.export.stac#

STAC Item 1.0 generator for HydroModPy simulations (https://stacspec.org).

Each simulation maps to one Item with:

  • bbox and geometry taken from the catalog bbox_xmin..bbox_ymax;

  • datetime set to the period midpoint, plus start_datetime / end_datetime when the period covers more than one instant;

  • assets describing the Zarr store, every Parquet table, the lockfile and any COG produced by the GeoTIFF exporter (when present on disk);

  • properties.proj:epsg and properties.proj:wkt2 from the catalog crs_epsg / crs_wkt columns.

The payload is a plain dict so callers can serialise it without pystac; the optional validate_item() helper relies on pystac.Item.from_dict when the library is installed.

Functions

build_stac_catalog(*, catalog_id, title, ...)

Return a STAC Catalog listing every project collection on disk.

build_stac_collection(items, *, collection_id)

Return a STAC Collection that groups items under collection_id.

build_stac_item(context)

Return one STAC Item for the simulation referenced in context.

validate_item(payload)

Validate an Item dict with pystac when installed.

write_stac_catalog(output_path, *, catalog_id)

Render and write a STAC Catalog to output_path/catalog.json.

write_stac_collection(items, output_path, *, ...)

Render and write a STAC Collection to output_path/collection.json.

write_stac_item(catalog, sim_id, output_path, *)

Render and write the STAC Item for sim_id.