Open-EO / openeo-processes

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

clip: Document edge cases #472

Closed m-mohr closed 8 months ago

m-mohr commented 8 months ago

Process ID: clip

Describe the issue:

During the test suite creation, I identified that the clip process doesn't mention what happens if min > max for example.

Proposed solution: We should check the tests and document what's missing, e.g. throw an error if min > max? Check what similar processes do, e.g. between.

Additional context: Tests in #468

m-mohr commented 8 months ago

What have backends impemented? @soxofaan @guss84 @clausmichele @LukeWeidenwalker

clausmichele commented 8 months ago

In the xarray/dask implementation, if max < min, no error is raised. The base function is provided by numpy, and they explicitly mention this in the docs: _No check is performed to ensure a_min < amax.

Anyway, we can agree to raise a predefined error if this happens.

soxofaan commented 8 months ago

I don't think we have a check either. Specifying to throw an error makes most sense to me too

m-mohr commented 8 months ago

PR: #477