@turf/boolean-within: add MultiPolygon support, de-duplicate logic#3011
Draft
rexxars wants to merge 3 commits intoTurfjs:masterfrom
Draft
@turf/boolean-within: add MultiPolygon support, de-duplicate logic#3011rexxars wants to merge 3 commits intoTurfjs:masterfrom
rexxars wants to merge 3 commits intoTurfjs:masterfrom
Conversation
Contributor
|
Nice! My 2c is to not deprecate as they are both commonly accepted de-9im terms. |
Member
|
Thanks for this PR too. Let's discuss on #3010 knowing that applies here as well. Believe worth keeping both |
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.
Note: builds on #3010 - review that one first.
The
@turf/boolean-withinmodule is basically a duplicate of@turf/boolean-contains, with the argument order swapped. This PR removes the duplicate logic, instead importing the@turf/boolean-containsmodule and calling it directly, with swapped argument orders. This has multiple benefits:(This was also suggested by @bratter in this issue I just found)
I would argue that one could consider deprecating this entire module in favor of
@turf/boolean-contains(or the other way around), as keeping the test suites in sync between the two is slightly annoying - but leaving this up to you as maintainers to decide :)Fixes #1444