Open-EO / openeo-earthengine-driver

openEO back-end driver for Google Earth Engine.
Apache License 2.0
21 stars 7 forks source link

save_result crs option fails #43

Closed clausmichele closed 4 years ago

clausmichele commented 4 years ago

If we set a crs in the save_result option, the process won't run and will return an error. Without the crs setting works fine. The process graph is the D22 EVI:

{
  "parameters": [
    {
      "name": "collection-id",
      "description": "The ID of the collection to load.",
      "default": "COPERNICUS/S2",
      "schema": {
        "type": "string",
        "subtype": "collection-id",
        "pattern": "^[\\w\\-\\.~/]+$"
      }
    },
    {
      "name": "bands",
      "description": "The band names for the NIR, RED and BLUE bands in exactly this order.",
      "default": [
        "B8",
        "B4",
        "B2"
      ],
      "schema": {
        "type": "array",
        "items": {
          "type": "string",
          "subtype": "band-name"
        }
      }
    }
  ],
  "process_graph": {
    "dc": {
      "process_id": "load_collection",
      "description": "Loading the data; The order of the specified bands is important for the following reduce operation.",
      "arguments": {
        "id": "COPERNICUS/S2_SR",
        "spatial_extent": {
          "east": 11.41024589538574,
          "south": 46.46411291724846,
          "north": 46.52249306235416,
          "west": 11.282358169555662
        },
        "temporal_extent": [
          "2018-06-06T00:00:00.000Z",
          "2018-06-23T00:00:00.000Z"
        ],
        "bands": [
          "B8",
          "B4",
          "B2"
        ]
      }
    },
    "evi": {
      "process_id": "reduce_dimension",
      "arguments": {
        "data": {
          "from_node": "dc"
        },
        "reducer": {
          "process_graph": {
            "nir": {
              "process_id": "array_element",
              "arguments": {
                "data": {
                  "from_parameter": "data"
                },
                "index": 0
              }
            },
            "sub": {
              "process_id": "subtract",
              "arguments": {
                "x": {
                  "from_node": "nir"
                },
                "y": {
                  "from_node": "red"
                }
              }
            },
            "div": {
              "process_id": "divide",
              "arguments": {
                "x": {
                  "from_node": "sub"
                },
                "y": {
                  "from_node": "sum"
                }
              }
            },
            "p3": {
              "process_id": "multiply",
              "arguments": {
                "x": 2.5,
                "y": {
                  "from_node": "div"
                }
              },
              "result": true
            },
            "sum": {
              "process_id": "sum",
              "arguments": {
                "data": [
                  1,
                  {
                    "from_node": "nir"
                  },
                  {
                    "from_node": "p1"
                  },
                  {
                    "from_node": "p2"
                  }
                ]
              }
            },
            "red": {
              "process_id": "array_element",
              "arguments": {
                "data": {
                  "from_parameter": "data"
                },
                "index": 1
              }
            },
            "p1": {
              "process_id": "multiply",
              "arguments": {
                "x": 6,
                "y": {
                  "from_node": "red"
                }
              }
            },
            "blue": {
              "process_id": "array_element",
              "arguments": {
                "data": {
                  "from_parameter": "data"
                },
                "index": 2
              }
            },
            "p2": {
              "process_id": "multiply",
              "arguments": {
                "x": -7.5,
                "y": {
                  "from_node": "blue"
                }
              }
            }
          },
          "parameters": [
            {
              "name": "data",
              "description": "",
              "schema": {}
            }
          ]
        },
        "dimension": "bands"
      }
    },
    "mintime": {
      "process_id": "reduce_dimension",
      "description": "Compute a minimum time composite by reducing the temporal dimension",
      "arguments": {
        "data": {
          "from_node": "evi"
        },
        "dimension": "t",
        "reducer": {
          "process_graph": {
            "min": {
              "process_id": "min",
              "arguments": {
                "data": {
                  "from_parameter": "data"
                }
              },
              "result": true
            }
          },
          "parameters": [
            {
              "name": "data",
              "description": "",
              "schema": {}
            }
          ]
        }
      }
    },
    "save": {
      "process_id": "save_result",
      "arguments": {
        "data": {
          "from_node": "mintime"
        },
        "format": "GTIFF-THUMB",
        "options": {
          "epsgCode": 32632
        }
      },
      "result": true
    }
  }
}
m-mohr commented 4 years ago

Thanks for the report. Which mode are you running? (sync, batch, web service) And which error do you get?

clausmichele commented 4 years ago

I am using batch_jobs, the name is _test_michele10 The error from the console is the following:

TypeError: "this.getTitle is not a function"
    queueJob JobPanel.vue:254
utils.js:10:10
TypeError: e is undefined

The first error is always present when I add a batch job.

m-mohr commented 4 years ago

I just fixed that error in the Web Editor (not deployed yet), but that's just a Web Editor error coming up while showing an actual error message from GEE.

The actual message I get ~from Google~ is just "EPSG:32632", unfortunately. ~I have no clue how I could prevent that.~ You can see that when running synchronously. The Batch Job doesn't really show detailed error messages yet as the 1.0 logging functionality is not implemented yet.

m-mohr commented 4 years ago

Okay, ignore what I wrote before. I just figured out it's not coming from Google, but is an issue with the PROJ JS implementation, which is missing several CRS definitions. I'll check how I can include them in the driver and then we'll see how this issue continues.

m-mohr commented 4 years ago

Fixed, works now. I redeployed the driver and it should work now. Let me know if there's still an issue for you. You should just be able to re-start the job.

Sorry for the initial confusion on my side.