unkinkPolygon does not handle polygons with interior holes
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- data
Research direction
Start at the turf.unkinkPolygon() entry point and reproduce the issue with the linked holeyFeatureCollection input and output. Trace how interior rings are classified; done means polygons with holes retain those holes rather than emitting them as separate exterior polygons.
Written by the indexing model from the issue text.
Description
When using turf.unkinkPolygon() on a polygon with interior rings, it appears to ignore those interior rings and treat them as exterior rings of an additional polygon. So for instance, if I feed in a FeatureCollection called holeyFeatureCollection to `unkinkPolygon(holeyFeatureCollection) which looks like this:

this is what the function spits out:

Also as additional info, if I feed in just the single Feature with the holey polygon, or just the Polygon, the result is the same FeatureCollection as output.
Input: https://gist.github.com/chrisbrainerd/05bfae9c2b6420c69692c90877a9e1c2
Output: https://gist.github.com/chrisbrainerd/08e5ad1e401023ffdc48bf7d2fbb11bc
- Dominant language
- TypeScript
- Stars
- 10.5k
- Forks
- 1k
- Avg merge
- 1h 11m
- Merged PRs (30d)
- 4
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.
More from Turfjs/turf
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
@turf/boolean-contains
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·