os-climate / hazard

Onboarding, creation and transformation of climate hazard models for OS-Climate
Apache License 2.0
6 stars 13 forks source link

Feat/stac output #84

Closed emileten closed 4 months ago

emileten commented 4 months ago

This PR adds functionality to convert the OS-C hazard inventory model to STAC.

OS-C hazard has a legacy custom JSON structure to describe an inventory of the indicators produced. For interoperatibility, there is a long standing goal of having these inventories be STAC-compliant. The goal of this PR is to support this option, while preserving the legacy behavior.

More specifically :

We kept it as simple as possible with minimal coding, which means that the resulting STAC metadata is sub-optimal. Ideally, we would want one item to describe a single zarr array. Instead, one STAC item and its single asset map to one HazardResource, that may describe a group of zarr arrays. As a consequence, the asset of the item isn't pointing to an actual dataset, but displays the path to zarr arrays that has to be built with parameters and scenarios described in properties. This isn't how STAC is supposed to be used, but for now this will fulfill the basic requirement.