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

Incoming data type is not compatible for parameter "temporal_extent" #300

Closed EmileSonneveld closed 3 weeks ago

EmileSonneveld commented 1 year ago

The following proces graph gives a valid response when submitting to OpenEO, but gives an error message in the web-editor. Incoming data type is not compatible for parameter "temporal_extent" Low priority issue for me, as I am not sure if it causes actual bugs.

{
  "process_graph": {
    "dateshift1": {
      "process_id": "date_shift",
      "arguments": {
        "date": "2021-07-01",
        "unit": "day",
        "value": -80
      }
    },
    "dateshift2": {
      "process_id": "date_shift",
      "arguments": {
        "date": "2021-08-01",
        "unit": "day",
        "value": 80
      }
    },
    "loadcollection1": {
      "process_id": "load_collection",
      "arguments": {
        "bands": [
          "B04",
          "B08",
          "SCL"
        ],
        "id": "SENTINEL2_L2A",
        "properties": {
          "eo:cloud_cover": {
            "process_graph": {
              "lte1": {
                "arguments": {
                  "x": {
                    "from_parameter": "value"
                  },
                  "y": 95
                },
                "process_id": "lte",
                "result": true
              }
            }
          }
        },
        "spatial_extent": null,
        "temporal_extent": [
          {
            "from_node": "dateshift1"
          },
          {
            "from_node": "dateshift2"
          }
        ]
      }
    },
    "saveresult1": {
      "process_id": "save_result",
      "arguments": {
        "data": {
          "from_node": "loadcollection1"
        },
        "format": "gtiff"
      },
      "result": true
    }
  },
  "parameters": []
}
m-mohr commented 1 year ago

It's likely that the anyOf in the sub-schema for items is not supported yet by the web editor, interesting.

{
    "type": "array",
    "subtype": "temporal-interval",
    "minItems": 2,
    "maxItems": 2,
    "items": {
        "anyOf": [
            {
                "type": "string",
                "format": "date-time",
                "subtype": "date-time"
            },
            {
                "type": "string",
                "format": "date",
                "subtype": "date"
            },
            {
                "type": "string",
                "subtype": "year",
                "minLength": 4,
                "maxLength": 4,
                "pattern": "^\\d{4}$"
            },
            {
                "type": "null"
            }
        ]
    }
}
m-mohr commented 3 weeks ago

This has been fixed.