Open-EO / openeo-processes-dask

Python implementations of many OpenEO processes, dask-friendly by default.
Apache License 2.0
19 stars 14 forks source link

Add basic handling for X,Y,band,time dimensions for transpose and rep… #244

Closed jzvolensky closed 4 months ago

jzvolensky commented 5 months ago

Hi all,

Corresponding issue which this will cover as well: https://github.com/Open-EO/openeo-processes-dask/issues/243.

I am currently working on adding the align parameter to the resample_spatial function as per the OpenEO processes documentation.

Part of this also involves handling cubes with different dimensions setups. For now, I edited the original fixed transpose to check the shape in the 4 basic dimensions.

Currently I added the align as a dummy parameter which does not do anything but allows us to use the function.

Couple of questions and ideas:

  1. Regarding the transpose/handling of the cube dimensions, how could we go about handling other dimensions since there are a lot of possibilities?
  2. How should the align parameter be implemented? what should the result be by using different align options?
  3. Since we already use ODC reprojection there is parameter anchor available which appears to do a similar operation to align link to the docs

Any feedback, ideas and suggestions are welcome!

Thanks!

clausmichele commented 5 months ago

It would be good to have feedbacks from the VITO team (@jdries @soxofaan) about how they implemented resample_spatial on their side. Do you handle N-dimensional datacubes? Like x,y,bands,t + other dimensions that can be added using add_dimension?

jdries commented 5 months ago

we don't do adding other dimensions, resample spatial just acts upon the x and y dimensions. The t and bands dimension are of course supported and basically left untouched.

clausmichele commented 5 months ago

I didn't mean that you add dimensions within this process, but I was wondering if you support as input datacubes with arbitrary number of dimensions (additional to x and y), which seems so from your reply! Thanks

jdries commented 5 months ago

to be clear: our backend does not at all support adding arbitrary number of dimensions. We mainly support these combinations for raster cubes: x,y x,y,bands x,y,bands,t x,y,t

ValentinaHutter commented 4 months ago

Thanks for the contribution! Will add this to the latest release!