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

Process "array_element" only accepts numbers for "label" parameter #43

Closed
christophfriedrich opened this issue Oct 5, 2020 · 4 comments
Assignees

Comments

@christophfriedrich
Copy link

Trying to run a process graph that contains

"reducer": {
    "process_graph": {
        "red": {
            "process_id": "array_element",
            "arguments": {
                "data": {
                    "from_parameter": "data"
                },
                "label": "B04"
            }
        },
        "nir": {
            "process_id": "array_element",
            "arguments": {
                "data": {
                    "from_parameter": "data"
                },
                "label": "B08"
            }
        },

I receive an error:

Expecting numeric value for 'label' but got 'B08'

But according to the /processes endpoint, both strings and numbers are valid:

image

Or as rendered in the Hub:

image

@soxofaan
Copy link
Member

Indeed this is a known issue
the geopyspark driver only supports (int) index in array_element

(internal ref: EP-3583)

@jdries
Copy link
Contributor

jdries commented Feb 6, 2023

Suggested solution:
we already have a 'context' map in OpenEOProcessScriptBuilder
This map could contain a mapping from dimension names to labels along that dimension.
So {'bands':['B02','B03']}
Band name aliases may need to be mapped to a standardized name beforehand?

@clausmichele
Copy link
Member

I really hope this will be fixed soon, since it affects the client too Open-EO/openeo-python-client#217

jdries added a commit that referenced this issue Jul 27, 2023
jdries added a commit to Open-EO/openeo-geotrellis-extensions that referenced this issue Jul 27, 2023
jdries added a commit that referenced this issue Jul 28, 2023
jdries added a commit to Open-EO/openeo-geotrellis-extensions that referenced this issue Jul 30, 2023
@jdries
Copy link
Contributor

jdries commented Jul 30, 2023

fixed on dev, will appear on prod soon.
Only for bands dimension, so no 'generic' support for labeled arrays.

@jdries jdries closed this as completed Jul 30, 2023
@jdries jdries self-assigned this Aug 1, 2023
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

5 participants