-
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
Add vector_to_points #313 #315
Conversation
After the comment from @clausmichele in #313 (comment), I've added another process @clausmichele Is the new process okay for you? |
I also understood/remember that we would do vector_to_points, and then use aggregate_spatial to sample over a raster if desired. |
Alright, I removed raster_to_points. |
I'm currently trying to implement this process. However, I was thinking that maybe the "count" parameter should be more a maximum number of points to extract in total. Otherwise there could be luge polygons where we extract 100 points a tiny ones where we do the same. What do you think? cc @soxofaan let me know if you have suggestions on how to improve the code! |
yes, I'm also wondering whether some kind of target density wouldn't be more practical than a bare count. (Still having optional minimum and maximum count might still be useful.) See #315 (comment) |
Open points:
|
FYI, shapely/geopandas has this method representative_point:
I'm not completely sure how it works, but I think it's explained here: https://gis.stackexchange.com/questions/414260/how-does-geopandas-representative-point-work |
Thanks, this is indeed interesting |
@m-mohr I've just noticed that:
How do we solve this? Should we modify the definition and return just points instead of MultiPoint? |
Good point and related: if you make each point a separate feature, you probably need a reference back to the original geometry in some way (because you can not just do that based on index anymore) |
Would a new process such as split_multi_geometries work? But overall the question is what is generally useful and required? Do you need a reference back or group the original geometry? Or is the underlying issue aggregate_spatial and we should not (mis-)use it then? |
It's getting every day more complicated! Possible solutions:
|
It seems like the actual issue here is aggregate_spatial though, right? We are somewhat misusing it to combine points with values although we are not aggregating, right? If that's the actual issue, then we need to check how we can accomplish that in a clean way. |
Yes, in my opinion using single points in aggregate_spatial it's an edge_case that can be handled as we are doing. |
But then we have no solution. I don't really understand what you are heading at right now. |
This would be a good solution indeed! For me it would be totally fine to let the user choose based on a parameter. |
(hmm for some reason my two comments above do no reference code diffs here, I hope it's clear what I refer to) |
@soxofaan Likely because you commented on a specific commit... |
I'm completely overwhelmed by this PR and can't really follow the status any longer. Thus, I think I'd merge this soon and then work on the remaining issues separately in issues and PRs. |
I even think we should do that more often: merge something under |
Adds a new process for the requirements given in #313.
Some questions are still open, see the comments in #313. This is therefore more a basis for further discussions rather than a final proposal.