I am trying to filter a vector cube by date. So far, I can’t find a process that would allow doing so. The obvious one would be filter_temporal
, but it only works with raster cubes, not vector cubes. The array_filter
might work, but its output is an array and not a geometry, so I can’t perform further spatial operations such as aggregate_spatial
. Any suggestions, aside from pre-filtering the data locally? The data I am using is a geoparquet file loaded using load_url
.
filter_temporal
would indeed be the logical choice to do this.
Unfortunately I don’t think there is an openEO back-end that already supports filter_temporal
on vector cubes
What openEO backend do you want to use?
If you want to use some variant of the “VITO/Terrascope” backend, there might be a workaround based on UDFs
I’m using OpenEO Platform, which then internally calls Terrascope, yes. A UDF would work, true, though it seems simple and common enough that it ought to be a process. That said, there would need to be a way to define in a vector cube which dimension/field is time. Perhaps it’s possible through STAC already, though in this case we are currently only using load_url
, which wouldn’t support that.
Converging to a good, flexible, future-proof standard to define vector cubes is indeed the hard part here. Leveraging STAC is certainly a good idea, but then again, vectorcube oriented implementations, if any, are experimental at best
I already created feature request ticket in VITO/Terrascope backend implementation: Support filter_temporal on vector cubes · Issue #344 · Open-EO/openeo-python-driver · GitHub
To better understand your use case: how does the time dimension work in your data set?
Do you have relatively persistent geometrical features that change (slowly) over time? For example: the boundaries of a large ice body, lake, forest, …
Or do you have completely different geometries for each time stamp (without any consistency guarantees)? E.g. the result of automatic segmentation of a noisy timeseries of observations.
Thanks! The use case is GitHub - Open-Earth-Monitor/UseCase_AIRCON: Use Case 23: Air Quality at Continental Scale (by Johannes Heisig): it’s air quality measurements from stations. So they are completely static, aside from some going online/offline at times. We just want to filter (and potentially aggregate with aggregate_temporal
) measurements to a particular year or time periods, so that we could then extract the corresponding data from the model output (ERA5/CAMS).