-
Notifications
You must be signed in to change notification settings - Fork 18
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
aggregate_spatial #107
aggregate_spatial #107
Conversation
Added aggregate_spatial.json as a replacement for aggregate_polygon (which will be deprecated)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR, @kempenep. I made some suggestions for the overall consistency (e.g. use geometries instead of vector).
As we also have filter_polygon, we should also apply the changes we make here to filter_polygon and rename it to filter_spatial, I think?
Edit: May also apply to mask_polygon in #103.
Thanks for the suggestions, agreed. The filter_polygon was already discussed during the meeting, where we decided to proceed as you suggested. This was going to be taken care of by ... (don't remember who)... |
@kempenep Do you want me to commit all the changes? I think filter_spatial was assigned to @GreatEmerald. I'm wondering whether filter/aggregate_geometries would be more intuitive to some users? Especially thinking about meteorology where I heard they would be likely confused about aggregate_spatial. |
You can commit all changes. Don't know which of spatial/geometries is to be preferred. I like "spatial" as it is in line with the "temporal" we already have. |
@kempenep I don't have write permissions to your repository ;-) Can you batch commit them via the FIles tab here at GitHub, please? |
We still need to deprecate aggregate_polygon, other than that the PR looks good now. |
Is the behaviour for lines and points already defined?
|
@jdries Yes, it's that line. |
For points, and lines, I would consider an intersection of the pixel bounding box with the geometry, instead of considering only pixel center. |
I agree on that, and here are two more reasons:
|
Indeed, the wording regarding the pixel center works only well with polygons. And for points it should consider the pixel (the whole, not just the center) that intersersects. But that's why I think separate processes are better suited for different geometry types and initially restricted it to polygons only... If you need to handle the geometry types differently, make different processes otherwise the process gets to difficult. We'll see how it works out also in filter_spatial. Edit: Your response was too fast ;-) Consider the second paragraph to be posted before your/Jeroens previous post. |
So the decision now is between having this process or separate ones? Maybe we need to discuss this in the next telecon again.. |
Yes, I think so, too. |
I don't see why we'd handle it any differently for different types of geometry. If the geomrety touches a pixel in any way, the pixel is included. Alternatively, like in R, add an optional argument that says whether to include anything that touches, or anything that the geometry envelops, or any pixels whose centres the geometry envelops. That would make it more flexible. For line or point features, enveloping implies being at the exact same location (so if it's right on the pixel centre and the user asks for enveloping, it's OK, otherwise the result is empty) |
I agree with Dainius here. I am also in favor of the optional argument, where I would adopt the GDAL terminology (as in gdal_rasterize): |
That sounds reasonable and would work consistently across all geometry types. See the suggestion below...
But also more complex to implement. Maybe we can start with the simpler case above and then see at which point we need the additional parameter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CHANGELOG entry is missing.
It's true that the "aggregate" name is a bit misleading in the point and line case, but from the usability point of view I think it's still better to have one process that gives summary statistics over geometry, than to have separate processes. You don't want to tell users "use this process to extract information over a polygon, and this process to extract information over lines and points", for the users it's all geometry anyway. You can make it handle different geometry in different ways if that makes the most sense (so it would be a process that behind the scenes calls one of three processes based on geometry type), as long as that makes it do the right thing for most users. Using a buffer around points and lines is also fine as far as implementation goes. (Though we need to think about what happens if you have a pixel on the corner between 4; I'd say it should return all 4 and reduce it with the given reducer.) |
Telco: We remove the "uniqueness" constraint for aggregate from the glossary. Edit: A to do before merging is to replace the new occurrences of aggregate_polygon in the UDF (coming from PR #111) processes with aggregate_spatial. |
There's a new proposal in PR #131 |
created new process aggregate_spatial as agreed during openEO process meeting on 20191212. The process aggregate_polygon will then be deprecated
Issue: #62