-
Notifications
You must be signed in to change notification settings - Fork 944
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
@turf/boolean-contains - support for multipolygon inside polygon #2357
base: master
Are you sure you want to change the base?
@turf/boolean-contains - support for multipolygon inside polygon #2357
Conversation
Adds support for the inverse of #2337 (A multipolygon completely contained by a polygon) |
@rowanwins hi! When is this feature going to be released? Merging this feature would help solve #1915 and help answer this comment. |
Hi @MartinP-C. Know it's been a while since you submitted this. We're working to get some old PRs merged. Are you still on board to see this one through with some assistance? |
Hi @smallsaucepan , absolutely. What is needed? |
Thanks @MartinP-C. Wondering a couple of things: Given booleanContains and booleanWithin are two sides of the same coin, should we expand the scope of the PR to make sure they're aligned? A quick look at the multipolygon tests in within shows some are being skipped so there might be some gaps there too. Secondly, if the above is true, I've noticed contains and within share a lot of very similar (though not identical) internal functions e.g. isPointInMultiPoint or isPolyInPoly. Would you mind seeing if this is an opportunity to pull the logic into a common module rather than having duplicated code? Possibly more than you signed on for 😅 though keen to introduce consistency and reuse where we can. |
It is a bit more but I'm up for the challenge :)
Where should common code go? |
Thanks @MartinP-C. That all sounds great. Regarding your question about where to put common code, have started discussion #2537. Perhaps jump in there first and we can work through an approach. |
@MartinP-C @smallsaucepan Hi! Can I help with anything to upload this feature? It'll be great to have it |
Hi! Any update about this feature? It'll be great to have it! |
Add support for feature2 being a MultiPolygon inside of a Polygon
npm test
at the sub modules where changes have occurred.npm run lint
to ensure code style at the turf module level.