Open-EO / openeo-web-editor

An interactive and easy to use web-based editor for the OpenEO API.
https://editor.openeo.org
Apache License 2.0
12 stars 17 forks source link

False claim that "Model is invalid" when "load_collection" contains "properties" #118

Closed christophfriedrich closed 3 years ago

christophfriedrich commented 3 years ago

Inserting into the JSON editor a process graph that includes the chunk given below, and then switching to the "Visual Model" view, gives the error:

Model is invalid Can't find block: value

"dc": {
    "process_id": "load_collection",
    "description": "Loading the data; The order of the specified bands is important for the following reduce operation.",
    "arguments": {
        "id": "S2MSI2A",
        "spatial_extent": {
            "west": 5.251809,
            "east": 5.462144,
            "north": 51.838069,
            "south": 51.705835
        },
        "temporal_extent": [
            "2019-01-01T00:00:00.000Z",
            "2020-01-01T00:00:00.000Z"
        ],
        "bands": ["B4","B8","SCL"],
        "properties": {
            "eo:cloud_cover": {
                "process_graph": {
                    "cc": {
                        "process_id": "between",
                        "arguments": {
                            "x": {
                                "from_parameter": "value"
                            },
                            "min": 0,
                            "max": 70
                        },
                        "result": true
                    }
                }
            },
            "eo:mgrs": {
                "process_graph": {
                    "mgrs": {
                        "process_id": "eq",
                        "arguments": {
                            "x": {
                                "from_parameter":"value"
                            },
                            "y": "31UFT"
                        },
                        "result": true
                    }
                }
            }
        }
    }
},
m-mohr commented 3 years ago

Full repro:

{
  "process_graph": {
    "1": {
      "process_id": "load_collection",
      "description": "Loading the data; The order of the specified bands is important for the following reduce operation.",
      "arguments": {
        "id": "S2MSI2A",
        "spatial_extent": {
          "west": 5.251809,
          "east": 5.462144,
          "north": 51.838069,
          "south": 51.705835
        },
        "temporal_extent": [
          "2019-01-01T00:00:00.000Z",
          "2020-01-01T00:00:00.000Z"
        ],
        "bands": [
          "B4",
          "B8",
          "SCL"
        ],
        "properties": {
          "eo:cloud_cover": {
            "process_graph": {
              "cc": {
                "process_id": "between",
                "arguments": {
                  "x": {
                    "from_parameter": "value"
                  },
                  "min": 0,
                  "max": 70
                },
                "result": true
              }
            }
          },
          "eo:mgrs": {
            "process_graph": {
              "mgrs": {
                "process_id": "eq",
                "arguments": {
                  "x": {
                    "from_parameter": "value"
                  },
                  "y": "31UFT"
                },
                "result": true
              }
            }
          }
        }
      },
      "result": true
    }
  }
}
m-mohr commented 3 years ago

Fixed, still needs to be deployed.

m-mohr commented 3 years ago

Has been released and deployed as version 0.5.0.