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

Update notebook, bands no more available #9

Closed
clausmichele opened this issue Feb 1, 2022 · 3 comments
Closed

Update notebook, bands no more available #9

clausmichele opened this issue Feb 1, 2022 · 3 comments

Comments

@clausmichele
Copy link
Member

Currently if we request specific bands an error is thrown:

collection      = 'SENTINEL1_GRD'
spatial_extent  = {'west':bbox[0],'east':bbox[2],'south':bbox[1],'north':bbox[3],'crs':'EPSG:4326'}
temporal_extent = ["2018-07-01", "2018-07-03"]
bands           = ["VV","VH"]

s1 = conn.load_collection(collection,spatial_extent=spatial_extent,bands=bands,temporal_extent=temporal_extent)

---------------------------------------------------------------------------
MetadataException                         Traceback (most recent call last)
<ipython-input-28-25892b486a99> in <module>
      4 bands           = ["VV","VH"]
      5 
----> 6 s1 = conn.load_collection(collection,spatial_extent=spatial_extent,bands=bands,temporal_extent=temporal_extent)

~\Miniconda3\envs\openeo_platform\lib\site-packages\openeo\rest\connection.py in load_collection(self, collection_id, spatial_extent, temporal_extent, bands, properties, fetch_metadata)
    849                 collection_id=collection_id, connection=self,
    850                 spatial_extent=spatial_extent, temporal_extent=temporal_extent, bands=bands, properties=properties,
--> 851                 fetch_metadata=fetch_metadata,
    852             )
    853         else:

~\Miniconda3\envs\openeo_platform\lib\site-packages\openeo\rest\datacube.py in load_collection(cls, collection_id, connection, spatial_extent, temporal_extent, bands, fetch_metadata, properties)
    189             if metadata:
    190                 bands = [ b if isinstance(b,str) else metadata.band_dimension.band_name(b) for b in bands]
--> 191                 metadata = metadata.filter_bands(bands)
    192             else:
    193                 # Ensure minimal metadata with best effort band dimension guess (based on `bands` argument).

~\Miniconda3\envs\openeo_platform\lib\site-packages\openeo\metadata.py in filter_bands(self, band_names)
    351         :return:
    352         """
--> 353         assert self.band_dimension
    354         return self._clone_and_update(dimensions=[
    355             d.filter_bands(band_names) if isinstance(d, BandDimension) else d

~\Miniconda3\envs\openeo_platform\lib\site-packages\openeo\metadata.py in band_dimension(self)
    312         """Dimension corresponding to spectral/logic/thematic "bands"."""
    313         if not self.has_band_dimension():
--> 314             raise MetadataException("No band dimension")
    315         return self._band_dimension
    316 

MetadataException: No band dimension

@soxofaan is this the expected behavior after the collection unification?

@soxofaan
Copy link

soxofaan commented Feb 4, 2022

confirmed, this the cube:dimensions data is not merged properly yet when combining https://openeocloud.vito.be/openeo/1.0/collections/SENTINEL1_GRD and https://openeo.eodc.eu/v1.0/collections/SENTINEL1_GRD

soxofaan added a commit to Open-EO/openeo-aggregator that referenced this issue Feb 4, 2022
@soxofaan
Copy link

soxofaan commented Feb 4, 2022

Fixed the problem. It should work now against the dev instance https://openeocloud-dev.vito.be/openeo/1.0/

deploying to production will probably not be for this week

@soxofaan soxofaan closed this as completed Feb 4, 2022
@clausmichele
Copy link
Member Author

I confirm that this issue has been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants