Open-EO / openeo-processes

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

clip: Document edge cases #472

Closed m-mohr closed 1 year ago

m-mohr commented 1 year 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 1 year ago

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

clausmichele commented 1 year 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 1 year ago

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

m-mohr commented 1 year ago

PR: #477