BooleanWithin does not work correctly with (Island polygon / Doughnut).
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 10.5k
- Forks
- 1k
- Avg merge
- 1h 11m
- Merged PRs (30d)
- 4
Description
Please provide the following when reporting an issue:
-
Version of Turf
6.5 -
I am trying to use Turf's
booleanWithinmethod to comapre two features in my dataset. When it comes to doing the check with polygons that have a hole in them, also know as Island polygon/ Doughnut, the method returns wrong results. The example used was a (Polygon,Multipolygon) =>booleanWithin(San Marino, Italy). Expecting this to return false but getting true.
Do Turf's boolean functions support Island polygons ?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at Turf's booleanWithin entry point and reproduce the case with the linked Italy and San Marino GeoJSON files. Check how polygon holes and multipolygons are handled, then verify that booleanWithin(San Marino, Italy) returns false while preserving existing boolean-function behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100