stactools icon indicating copy to clipboard operation
stactools copied to clipboard

Add API+CLI ability to add the `raster` extension (and maybe other extensions) to an item

Open gadomski opened this issue 3 years ago • 5 comments

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 avatar Aug 30 '21 20:08 gadomski

@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?

volaya avatar Sep 13 '21 08:09 volaya

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

volaya avatar Sep 13 '21 12:09 volaya

This seems similar to #159. I'll close that one.

cholmes avatar Sep 13 '21 22:09 cholmes

Note there might be some overlap between this and rio-stac: https://github.com/developmentseed/rio-stac/, which adds the raster extension.

kylebarron avatar Sep 13 '21 23:09 kylebarron

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.

cholmes avatar Sep 14 '21 16:09 cholmes