isamplesorg / export_client

Client for the iSamples export service
Apache License 2.0
1 stars 1 forks source link

Output to folder hierarchy #10

Open datadavev opened 2 months ago

datadavev commented 2 months ago

STAC collections may themselves contain collections, which is a convenient way to gather exported resources and view with a stac-browser.

Task here is to save an export to a subfolder of a root folder, and provide a stac collection document in the root folder that links to the collection in the export folder. For example:

./data
    stac.json. 
    export-1/
        stac.json
        some-data.json
        some-data_geo.parquet
    export-2/
        stac.json
        some-more-data.json
        some-more-data_geo.parquet

The stac collection document in data/stac.json might have contents something like:

{
    "type": "Collection",
    ...
    "links": [
    {
        "rel":"child",
        "type":"application/json",
        "title":"Some data",
        "href":"export-1/stac.json"
    },
    {
        "rel":"child",
        "type":"application/json",
        "title":"Some more data",
        "href":"export-2/stac.json"
    }
    ]
}

The source of this catalog provides an example of child collections: https://radiantearth.github.io/stac-browser/#/external/raw.githubusercontent.com/eco4cast/neon4cast-ci/main/catalog/catalog.json?.language=en

dannymandel commented 2 months ago

https://github.com/isamplesorg/export_client/commit/0987bb6643bb87998ac9dd65e5af323e0c2d08eb