-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to run a UDF on vector cube to access geometry? #449
Comments
It would be good to discuss this based on specific use cases. For label filtering there's filter_labels, maybe apply_dimension works, but other processes might be needed. |
To modify the 'bands' (I'm assuming properties are stored in the bands dimension') we typically use apply_dimension(cube,dimension='bands',process=my_callback) my_callback then gets a labeled array, where the labels are band/property names |
I don't quite get the question @jdries:
See https://openeo.org/documentation/1.0/datacubes.html#dimensions for details/examples. So you don't need the context for this, you always have a numerical or string based label for these dimensions. |
Yes, but the question is how to get to those labels from within a callback passed to apply_dimension:
This passes on a labeled array to my process, where the labels of the array will be band names, but what if I in addition need to know the single geometry label? (So the WKT string, for that labeled array.) |
You could get all WKT strings the array elements using array_labels: https://processes.openeo.org/#array_labels |
I think that would give me an array of band names in the above example, whereas I'm rather looking for the single label of the 'geometry' dimension. |
How does your data cube look like? It feels this issue is lacking context. |
We're trying to support/implement a use case that depends heavily on vector cube manipulation, in particular running some custom (Python) UDF on the geometry data.
For example some (GeoJSON) feature collection manipulation use cases that are straightforward to implement the classic way, outside the openEO framework:
How should these be implemented with openEO processes?
Note that with vector cubes, a lot of the relevant data to work with is in the labels (geometry data), which is quite different compared to how we typically work with raster data cubes
The text was updated successfully, but these errors were encountered: