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

"SENTINEL1_GRD" band metadata is not properly enriched #277

Closed
bossie opened this issue Mar 11, 2022 · 7 comments
Closed

"SENTINEL1_GRD" band metadata is not properly enriched #277

bossie opened this issue Mar 11, 2022 · 7 comments
Assignees
Labels

Comments

@bossie
Copy link
Collaborator

bossie commented Mar 11, 2022

The band metadata for collection "SENTINEL1_GRD" is not properly enriched by the STAC metadata at https://collections.eurodatacube.com/stac/sentinel-1-grd.json.

This is because the order of the bands in "cube:dimensions"/"bands"/"values" is different from the order of bands in "summaries"/"raster:bands":

{"values":["VV","VH","HH","HV"]}

as opposed to

{
  "raster:bands":[
    {
      "name":"VV",
    },
    {
      "name":"VH",
    },
    {
      "name":"HV",
    },
    {
      "name":"HH",
    }
  ]
}

The specification says that "values" is "A set of all potential values" so that implies that it is unordered.

@m-mohr
Copy link
Member

m-mohr commented Mar 14, 2022

Actually, the values in STAC should be ordered. I guess this should be fixed in STAC. Opened an issue here:
stac-extensions/datacube#11

@soxofaan
Copy link
Member

Is there anything that should be fixed/adapted at the level of the python client?

@bossie
Copy link
Collaborator Author

bossie commented Mar 28, 2022

No, apparently it's something that Sinergise should fix (but not quite yet because it will break our S1 collections: Open-EO/openeo-geopyspark-driver#129).

@bossie bossie closed this as completed Mar 28, 2022
@soxofaan
Copy link
Member

I think this ticket should be re-opened because it's still an issue:

import openeo
con = openeo.connect("openeo.vito.be")
datacube = con.load_collection('SENTINEL1_GRD')

triggers warning:

.../openeo/metadata.py:284: UserWarning: Band name mismatch: ['VV', 'VH', 'HH', 'HV'] != ['VV', 'VH', 'HV', 'HH']
  complain("Band name mismatch: {a} != {b}".format(a=cube_dimension_band_names, b=eo_band_names))

And practically it means that the client potentially will use wrong index when translating cube.band("HH") to a reduce_dimension callback like array_element(data, index=3)

@m-mohr m-mohr reopened this May 18, 2022
@soxofaan
Copy link
Member

Metadata issue must be fixed at back-end side.
But what we can do in the client is not supporting e.g. cube.band("HH") if the band's position is unclear

@soxofaan soxofaan self-assigned this May 18, 2022
@bossie
Copy link
Collaborator Author

bossie commented Jun 17, 2022

Open-EO/openeo-geopyspark-driver#129 was fixed so I adapted layercatalog.json in order to align the band names and get rid of the warning.

@soxofaan
Copy link
Member

Confirmed, I don't get the UserWarning anymore when loading "SENTINEL1_GRD" on openeo-dev.vito.be

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

No branches or pull requests

3 participants