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

hard-coded dimension name in ImageCollectionClient.band() #93

Closed
lforesta opened this issue Oct 24, 2019 · 6 comments
Closed

hard-coded dimension name in ImageCollectionClient.band() #93

lforesta opened this issue Oct 24, 2019 · 6 comments

Comments

@lforesta
Copy link
Contributor

The band() method (which is a reduce over the spectral dimension) hard-codes "spectral_bands" as the dimension name for the spectral dimension of a collection. However, this info should be read from the collection metadata of the backend, since it may vary.
An option would be to send a request to /collections/collection_name when the load_collection() method is used in the client and store the collection metadata locally (temporarily, just for the current session).

Related to issue 25 in openeo-python-driver

@soxofaan
Copy link
Member

Under #77 I already improved metadata handling in the client, so what you suggest should be pretty straightforward

@soxofaan
Copy link
Member

soxofaan added a commit to soxofaan/openeo-python-client that referenced this issue Oct 24, 2019
soxofaan added a commit to soxofaan/openeo-python-client that referenced this issue Oct 24, 2019
soxofaan added a commit to soxofaan/openeo-python-client that referenced this issue Oct 24, 2019
…data instead of hardcoded "spectral_bands"
soxofaan added a commit to soxofaan/openeo-python-client that referenced this issue Oct 25, 2019
@soxofaan
Copy link
Member

Update: it's less straightforward as I hoped because the metadata (possibly) changes with every operation, which is not yet implemented. For example, when you do bit of basic "band math" the metadata ends up empty at some point and things break down.

@jdries
Copy link
Collaborator

jdries commented Nov 30, 2019

The issue here is with the dimension name, in the latest workshop, we decided to use 'bands' for this well known dimension.
We should fix this in our backend and in the client as well.

jdries added a commit to Open-EO/openeo-python-driver that referenced this issue Nov 30, 2019
@soxofaan
Copy link
Member

minor note: the API spec only recommends the dimension name "bands", it does not enforce it (as far as I currently understand). So while this is clearly better and fixes the original issue for most cases, it still might pop up later.

soxofaan added a commit to soxofaan/openeo-python-client that referenced this issue Apr 29, 2020
…band metadata parsing

- move metadata handling to own openeo.metadata module
- add "parsing" of dimensions metadata (name, extent)
- do early warning instead of lazy loading 
- drop support for old  VITO band spec
soxofaan added a commit to soxofaan/openeo-python-client that referenced this issue May 5, 2020
…pectral_bands", "temporal")

- bump version so users can stick to older client version if dimension name checks are too aggressive for their backend
- recommended temporal dimension name is "t"
- recommended bands dimension name is "bands"

other refs: Open-EO#123, Open-EO#132, Open-EO#128
soxofaan added a commit that referenced this issue May 11, 2020
…, "temporal")

- bump version so users can stick to older client version if dimension name checks are too aggressive for their backend
- recommended temporal dimension name is "t"
- recommended bands dimension name is "bands"

other refs: #123, #132, #128
@soxofaan
Copy link
Member

merged the fixes in master

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

No branches or pull requests

3 participants