According to the openEO process manual a cloud filter can be set in the properties
argument of load_collection. In the manual the filter is given as JSON string, to be
able to use it with the R client we translated it as seen below.
The call gives a server Error, saying process âbetweenâ is not supported. We have already reported this here. The same error type is thrown when using âltâ or âlteâ instead of âbetweenâ.
How would a working example for the cloud filter look like?
The argument sub type metadata-filter is currently missing in the package and was probably included after API version 1.0.0. I have to get some more information regarding the API, first, because it seems it requires a different serialization.
I have also opened an issue on Github about this: Improve meta data filtering on load_collection ¡ Issue #102 ¡ Open-EO/openeo-r-client ¡ GitHub
the code for the between filter looks mostly good, except that you probably need to use list("from_parameter" = "x") instead of referring to value. Still, the issue seems back-end related as confirmed in the other thread. To me it looks âlteâ is also not working on the server-side (âSERVER-ERROR: [500] unknown: process lte is not supportedâ), weâll need to check. @jeroen.dries
The exact property needed is still a bit collection specific. Weâre looking into that and will also fix the filtering on Sentinelhub.
Note that processes for collection filtering are entirely different from everything else, so again a separate code path! (Meaning support for âbetweenâ and âltâ is indeed not there.)
I would really recommend it in any workflow, as even filtering on for instance 95% cloudcover gets rid of some entirely useless observations, and thus improves performance.
Hi,
thanks for the update. We fixed our previous translation for the R-client to use lte instead of between. With the following code this now works perfectly. After defining âcloudfilterâ we pass it to the properties argument in load_collections.
After the update to version 1.2.0 of the R-client this property filter no longer works. The error message reads:
âError in FUN(X[[i]], âŚ) :
Value for the metadata filter needs to be a list of functions.â
Can you maybe provide an updated version of how above filter could be implemented now?