How to build a stac index for geotiff and other rasters on local file systems and Windows server shares? It would later be consumed by something like stac-browser
1 Answer
Two tools that produce STAC items from geotiffs are:
rio-stac is more feature-ful and customizable, stactools is simpler. Here's an example of using and installing rio-stac:
pip install rio-stac
rio stac tests/fixtures/dataset_cog.tif
The STAC item will be printed to standard output.
If your geotiffs are from an open geospatial data provider, it might be worth checking https://github.com/stactools-packages/ to see if there's a repository for your dataset already created. stactools-packages can provide richer STAC items and collections that what could be created from the geotiffs alone.
-
So if my understanding is correct: rio-stac would handle 'add item to the stac', but doesn't address identifying items to add, or creating and hosting the catalog to add to. So one step out of three (and maybe more?). Feb 14 at 23:18
-
rio-stac
(or stactoolscreate-item
) would create a STAC Item for a geospatial raster. To browse a many items with a tool like stac-browser, you would need to add your items to a collection. There's many examples of this in the stactools-packages Github organization -- here's one for ASTER. You could also create your collection by hand by writing the JSON file yourself. Feb 16 at 13:12 -
Thanks for the additional info on stactools-packages Pete. This is imagery we've purchased from various vendors over 20 years, so no there isn't an existing repository we can leverage unfortunately. We are building from ground up. Feb 20 at 21:36