Merged
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.
joa-quim
approved these changes
Aug 21, 2023
Member
joa-quim
left a comment
There was a problem hiding this comment.
Gave the same result as my (very) simple test for the GMT.jl inwhichpolygon() function.
Member
|
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. |
Member
Author
|
Well, see +p which we then need to allow |
Member
Author
|
On bus so hard to check |
Member
|
Yes, +p can be the solution. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.