-
Notifications
You must be signed in to change notification settings - Fork 47
Add STAC 1.1 bands support to load_stac metadata guessing #780
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
Conversation
7d82278 to
1bbfeed
Compare
based on implementation from Open-EO/openeo-geopyspark-driver#1213
to resolve lint issue about unresolved name
and unit test coverage
3b7212d to
2d42695
Compare
Support for STAC 1.1 item_assets through `Collection.item_assets` is only available since 1.12. Below that DIY dict handling is necessary.
3c773d1 to
6d5c5ad
Compare
openeo/metadata.py
Outdated
| return TemporalDimension(name=name, extent=extent) | ||
|
|
||
| def _band_from_eo_bands_metadata(self, band: Union[dict, pystac.extensions.eo.Band]) -> Band: | ||
| """Construct band from metadata dict in eo v1.1 style""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| """Construct band from metadata dict in eo v1.1 style""" | |
| """Construct band from metadata in eo v1.1 style""" |
openeo/metadata.py
Outdated
| return bands | ||
|
|
||
| # TODO: instead of warning: exception, or return None? | ||
| self._warn("bands_from_stac_item: no band name source found") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: way to suppress this warning when traversing a deeper hierarchy?
openeo/metadata.py
Outdated
| return _BandList(self._band_from_common_bands_metadata(b) for b in asset.extra_fields["bands"]) | ||
|
|
||
| # TODO: instead of warning: exception, or return None? | ||
| self._warn("bands_from_stac_asset: no band name source found") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
way to suppress warning when traversing
79eae28 to
68c4b6b
Compare
c9fc810 to
81d0d84
Compare
for #699, #692, #586