Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Asset.bands #1225

Open
4 tasks
gadomski opened this issue Sep 26, 2023 · 0 comments · May be fixed by #1238
Open
4 tasks

Add Asset.bands #1225

gadomski opened this issue Sep 26, 2023 · 0 comments · May be fixed by #1238
Assignees

Comments

@gadomski
Copy link
Member

gadomski commented Sep 26, 2023

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:

if asset.owner and isinstance(asset.owner, pystac.Item):
self.additional_read_properties = [asset.owner.properties]

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 to Asset
  • 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?
@gadomski gadomski added this to the 1.9 milestone Sep 26, 2023
@gadomski gadomski self-assigned this Sep 26, 2023
@gadomski gadomski linked a pull request Sep 27, 2023 that will close this issue
5 tasks
@gadomski gadomski removed this from the 1.9 milestone Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

1 participant