Open-EO / openeo-processes

Interoperable processes for openEO's big Earth observation cloud processing.
https://processes.openeo.org
Apache License 2.0
49 stars 15 forks source link

merge cubes with different resolutions by UDF #437

Open jdries opened 1 year ago

jdries commented 1 year ago

A user is requesting to load Sentinel-2 data in the original 10m and 20m resolution (resolution depends on band), and then to apply a UDF, receiving those bands in the original resolution.

I haven't entirely figured it out yet. One option is a complex contraction of merge_cubes and apply_neighborhood where cubes do not need full alignment and the UDF receives an xarray Dataset with the variables having different resolutions.

Another option, which I will probably implement as a first solution, is simply trying to load the 10m and 20m bands in a single datacube, and then applying a UDF with a new signature that takes an xarray Dataset.

I think I will be able to implement the second option, only problem is that it doesn't comply with the datacube model, as the virtual datacube will be fully 10m resolution, while the udf will still receive bands with mixed resolutions.