Open-EO / openeo-python-driver

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

Running UDF on Vector Cube #197

Open soxofaan opened 1 year ago

soxofaan commented 1 year ago

reported by @mbuchhorn :

fails with

  File ".../openeo_driver/ProcessGraphDeserializer.py", line 1491, in run_udf
    data = data.to_legacy_save_result()
  File ".../openeo_driver/datacube.py", line 366, in to_legacy_save_result
    if cube.dims == (self.DIM_GEOMETRIES, "t"):
AttributeError: 'NoneType' object has no attribute 'dims'
soxofaan commented 1 year ago

apparently, the VITO backend now has 3 non-official processes to load geojson data from url:

running run_udf on DriverVectorCube is not properly supported yet, so it might be better to use one of the others for now.

also related: https://github.com/Open-EO/openeo-processes/issues/322 which recommends to use load_geojson to load geojson from URL

soxofaan commented 1 year ago

hmm, I tried to set up a POC based on read_vector/DelayedVector, but that doesn't seem to be working either: DelayedVector strips out all properties along the way (keeping only the geometries):

soxofaan commented 1 year ago

I iterated on PR Open-EO/openeo-api#200 and merged that in f83d1cf6f7ea04461bc7a21179f0629dbfee332d which adds initial support for doing apply_dimension with a UDF on a vector cube

soxofaan commented 1 year ago

Some related API/process questions/discussions: