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
Augment gmtspatial with -N+i #7747
Conversation
The -N+i setting will treat each input point individually and determine which polygon it falls into (if any). If a polygon ID is found then we write that point's full record out and add a final column with the ID.
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.
Gave the same result as my (very) simple test for the GMT.jl inwhichpolygon() function.
Wait, BUG. If headers have no -Z or -L
And I would really love to have a way to get ID's start counting at 1, not 0. |
Well, see +p which we then need to allow |
On bus so hard to check |
Yes, +p can be the solution. |
The -N+i setting will treat each input point individually and determine which polygon it falls into (if any). If a polygon ID is found then we write that point's full record out and add a final column with the ID.
Test example with some fake points and polygons::
Then running the command:
So 5 points each in polygon IDs 888 and 999, plus one point outside all and hence skipped.
Note: I have labelled it WIP and would appreciate some more testing before we approve/merge.