appelmar/gdalcubes

Add ability to export image_collections as STAC collections?

Opened this issue · 1 comments

Would you consider adding an export utility that could generate STAC collection metadata (JSON) that would go with a cube? Perhaps such functionality belongs more to rstac, or some combination of the two, but as gdalcube object already contains the metadata it seems like a natural feature (maybe complementing the existing support for writing assets, eg, via gdalcubes::write_tif()).

I think the argument you make in https://doi.org/10.3390/data4030092 for on-demand cubes is pretty compelling. All the same, I could see it being nice to have a way to easily export/share/reuse cubes created and processed with GDAL cubes. I'm still learning here, but It seems like the natural/cloud-native approach would be to put both the COG assets and a STAC JSON catalog on an S3 bucket (or really any other web platform for hosting data).

Thanks for the idea (and sorry for the late reply), I agree this would be very useful especially as an addition to the output from write_tif(). I still need some time to learn a bit about which STAC extensions might be useful here (e.g., https://github.com/stac-extensions/datacube), but other than that, this should not be too difficult to implement.