Open clausmichele opened 2 months ago
Thanks for pointing this out! We do not use it, yet, but I tested it this week and found that:
[ ] the process specification is outdated in https://github.com/eodcgmbh/openeo-processes/blob/master/filter_labels.json
[ ] the filter_labels
works with condition
processes that only have one input parameter x
, such as is_valid
e.g.
"filter2": {
"process_id": "filter_labels",
"arguments": {
"data": {
"from_node": "load1"
},
"condition": {
"process_graph": {
"is1": {
"process_id": "is_valid",
"arguments": {
"x": {
"from_parameter": "value"
}
},
"result": true
}
}
},
"dimension": "t"
}
}
[ ] condition
processes with two input parameters x
and y
currently do not run through, as the y
is not parsed correctly. We could use the context
parameter to do this.
[ ] using a condition
process like eq
currently does not work for strings or datetime objects, so we will need to check the comparison
category for that. From the example, I would assume that you want to use the between
process? Is that correct?
I think we can try to get these changes done in the next few weeks.
Meanwhile, does it make sense to you to use filter_temporal
instead?
Also, to list all things that need to be done:
filter_labels
Hi @ValentinaHutter, do you have plans to work on this? Being able to filter only specific dates is a feature which would be helpful to many. The use of filter_temporal is a workaround but for many dates generates an over-complex graph and it's also not trivial to implement client side.
The implementation of
filter_labels
is here: https://github.com/Open-EO/openeo-processes-dask/blob/9267e4ccffbbbf755cb7b8a43ba80d9483398314/openeo_processes_dask/process_implementations/cubes/_filter.py#L90However, I can't find any test or examples using it.
I would like to use it to filter specific dates from a datacube. Something similar to what is done here: https://github.com/Open-EO/openeo-community-examples/blob/815ab0cf4662a1b2be0881f55a9d4896467ed224/python/ParcelDelineation/Parcel%20delineation.ipynb
@ValentinaHutter @GeraldIr do you use
filter_labels
somewhere?