Open-EO / openeo.org

openeo.org landing page
https://openeo.org
Apache License 2.0
5 stars 15 forks source link

cookbook: misleading info on apply_neighborhood #84

Closed soxofaan closed 3 months ago

soxofaan commented 5 months ago

Raised by @MartinSchobben at https://github.com/Open-EO/openeo-processes-dask/pull/215#issuecomment-1883670997

Pre-defined processes (median, max, sd etc.) can be applied to spatial, temporal or even spatio-temporal neighbourhoods with apply_neighborhood.

(from: https://github.com/Open-EO/openeo.org/blame/10b68cee63b1dac17d8a4902a02f325563be6743/documentation/1.0/cookbook/README.md#L1198)

This is misleading: none of the given examples (median, max, sd) can actually be used with apply_neighborhood: the former processes take an array as input and produce a scalar, while apply_neighborhood expects processes that receive a raster data cube and produce a new raster data cube.

I think the only pre-defined process that makes practical sense to pass to apply_neighborhood is run_udf at the moment

I propose to just remove the following from the cookbook

Pre-defined processes (median, max, sd etc.) can be applied to spatial, temporal or even spatio-temporal neighbourhoods with apply_neighborhood. Due to lack of implementation by back-ends, this is not covered at this point.

Note that the VITO backend does implement apply_neighborhood, so that second sentence also makes little sense to keep as-is.