This repository contains material to build a SpatioTemporal Asset Catalog (STAC) for AHN datasets.
Warning
This material is under active development and could drastically change at any time.
The data folder contains static STAC collections structured as stac-geoparquet. You can visualize the collections at the following links: AHN2, AHN3, AHN4, AHN5, AHN6
The STAC collection files can be searched using rustac, which can be installed with:
python -m pip install rustacUsing rustac you can run queries like the following (change the name of the parquet file in the URL to search the corresponding AHN[2-6] collection):
# find all items intersecting the given bbox
rustac search --bbox 5.085297,52.050390,5.197220,52.117516 https://raw.githubusercontent.com/cloud-nes/ahn-stac/main/data/AHN2.parquet > results.jsonCheck rustac search --help to see other options. The results.json file contains the resulting items (you can visualize the file e.g. on stac-map).
You can download the assets linked to a set of items using stac-asset, which can be installed with:
python -m pip install stac-asset[cli]To download assets from a selection of items identified as above:
# only donwload point cloud assets ("PC" key) from the selected items
stac-asset download -i PC --max-concurrent-downloads 1 results.jsonNote that stac-asset also read items from standard input, so that rustac and stac-asset commands can be chained:
rustac search --bbox 5.085297,52.050390,5.197220,52.117516 https://raw.githubusercontent.com/cloud-nes/ahn-stac/main/data/AHN2.parquet | \
stac-asset download -i PC --max-concurrent-downloads 1Serve the collections as a STAC API using stac-fastapi-geoparquet using:
docker compose upThe STAC API should run at http://127.0.0.1:8000 (you can inspect the catalog using the STAC Browser).