Add property for self-intersections (kinks) in polygons
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 271
- Forks
- 65
- PR merge metrics
- No merged PRs in 30d
Description
We have been working on trying to detect if a polygon intersects itself when a user is drawing a polygon on the map in realtime or after a user completes the polygon. We tried to implement our own method using multiple approaches with [this](https://github.com/mapbox/turf-swift/issues/178#issuecomment-1058684767) being one of them but all seem to have false positives.
Is there a plan to [port this over from Turf.js](https://turfjs.org/docs/#kinks)? Has anyone implemented this in the past where you didn't receive false positives?
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 by reviewing the linked Turf.js kinks documentation and the prior Turf.swift discussion in issue #178. No source file or test is named; define the proposed Swift API and validate it against polygons with and without self-intersections, including the false-positive cases described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100