Open-EO / openeo-python-driver

Common parts of a Python driver implementation for OpenEO
Apache License 2.0
11 stars 6 forks source link

Support parametrization of properties in UDP #327

Open VincentVerelst opened 1 week ago

VincentVerelst commented 1 week ago

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 'orbitstate' 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 commented 3 days ago

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: https://github.com/Open-EO/openeo-python-driver/blob/06f767027130e6f0dd14da699c49ec61361a601f/openeo_driver/filter_properties.py#L13-L17

soxofaan commented 3 days ago

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

VincentVerelst commented 3 days ago

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

This would be needed for the WorldCereal project.