Add `Asset.bands`
gadomski opened this issue · comments
To support the implementation of radiantearth/stac-spec#1213, we need to add support for the bands
attribute on assets. This attribute should be a list of band objects, and each band object should have accessors for its spec-defined attributes. These accessors should look up the attribute value in the band, then in the asset, then in the item, in a "fall-up" mechanism. This is similar to how extensions currently "fall-up" to find their values:
pystac/pystac/extensions/projection.py
Lines 345 to 346 in 1849222
After discussion at the STAC sprint, our initial implementation plan is:
- Abstract the current behavior, implemented in extensions, to fall back to item properties if the given property isn't present on an asset or band
- Create a
Bands
class that extends the new abstracted behavior - Add
bands
toAsset
- Refactor all extensions to use the new abstracted behavior
This may require close coordination with any resolutions proposed to #448, e.g. #1051.
Twists
- Some attributes should not "fall-up", e.g. "created" ... do we need to handle this?