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

Support parametrization of properties in UDP #327

Open
VincentVerelst opened this issue Nov 14, 2024 · 3 comments
Open

Support parametrization of properties in UDP #327

VincentVerelst opened this issue Nov 14, 2024 · 3 comments

Comments

@VincentVerelst
Copy link

The process graph below is part of a UDP with three parameters: spatial_extent, temporal_extent and orbit_state. The latter is a string that can either be "DESCENDING" or "ASCENDING".

"loadcollection1": {
      "process_id": "load_collection",
      "arguments": {
        "id": "SENTINEL1_GRD",
        "properties": {
          "sat:orbit_state": {
            "process_graph": {
              "eq1": {
                "process_id": "eq",
                "arguments": {
                  "x": {
                    "from_parameter": "value"
                  },
                  "y": {
                    "from_parameter": "orbit_state"
                  }
                },
                "result": true
              }
            }
          }
        },
        "spatial_extent": {
          "from_parameter": "spatial_extent"
        },
        "temporal_extent": {
          "from_parameter": "temporal_extent"
        }
      },
      "result": true
    }

Running this UDP results in the following error:
OpenEoApiError: [400] PropertyConditionInvalid: Expected parameter 'value' but got 'orbit_state'
job id: cdse-j-241114ee6489428aad7351dd62b881c3

It seems the parametrization of properties, like orbit_state is not yet supported in the backend. Hence the request for its support here.

@soxofaan
Copy link
Member

parameterization of spatial_extent and temporal_extent should indeed already be covered

property filtering indeed does not support parameterization yet.
To be added to usage of this helper:

def extract_literal_match(condition: dict, parameter_name="value") -> Dict[str, Any]:
"""
Turns a condition as defined by the load_collection process into a set of criteria ((operator, value) pairs).
Conditions are currently limited to processes "eq", "lte" and "gte" so they will be turned into a single criterion.
"""

@soxofaan
Copy link
Member

@VincentVerelst can you also state for which project this is important (for planning purposes)?

@VincentVerelst
Copy link
Author

@VincentVerelst can you also state for which project this is important (for planning purposes)?

This would be needed for the WorldCereal project.

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