Open-EO / Open-EO/openeo-python-driver

support 'if/else' on constant arguments

Open
#226 1 comment 0 reactions 1 assignee View on GitHub

@jdries is already working on this.

Since Sep 12, 2023.

Dominant language
Python
Stars
12
Forks
8
Avg merge
6d 3h
Merged PRs (30d)
4

Description

The following graph excerpt currently fails:

 "eq6": {
    "process_id": "eq",
    "arguments": {
      "x": {
        "from_parameter": "region"
      },
      "y": "Deserts"
    }
  },
  "if3": {
    "process_id": "if",
    "arguments": {
      "accept": {
        "from_node": "divide13"
      },
      "reject": 0,
      "value": {
        "from_node": "eq6"
      }
    }
  },

Problem is that we only support the more complex case, where the condition is applied to raster values.
The simple case where the parameter value is a constant (from a udp) which is compared to another constant is not supported yet.
It may be easier to handle this in the python side, and thus achieve an optimization where only the chosen branch of the if statement is evaluated further.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.