stactools
stactools copied to clipboard
Add API+CLI ability to add the `raster` extension (and maybe other extensions) to an item
Is your feature request related to a problem? Please describe.
Many useful Item
attributes, especially extension attributes, are trivial to construct by (e.g.) reading the metadata of a raster file.
Describe the solution you'd like We should provide a function, available via both the API and the CLI, to add common extensions to an item by reading the metadata from an asset.
@gadomski I want to start working on this, but I was thinking that there should be some module in pystac to handle the raster extension stuff (like we have for other extensions, under pystac/extensions
). I haven't seen any issue open in there about this. Should I put all the logic for the raster extension in stactools and then we discuss about moving part of it to pystac if that's better?
Nevermind, I had an older version of pystac, and I have just seen that pystac already has the raster extension support. Sorry for the noise
This seems similar to #159. I'll close that one.
Note there might be some overlap between this and rio-stac: https://github.com/developmentseed/rio-stac/, which adds the raster
extension.
Thanks for mentioning that @kylebarron. I think the user flows are a bit different - I suspect this will mostly be used to take an existing STAC collection or item and add the raster info to each item, while rio stac lets you create a new item with raster.
But potentially may be able to share some code between the two.