Skip to content
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

Add property for self-intersections (kinks) in polygons #190

Open
Sean12oshea opened this issue May 23, 2022 · 1 comment
Open

Add property for self-intersections (kinks) in polygons #190

Sean12oshea opened this issue May 23, 2022 · 1 comment

Comments

@Sean12oshea
Copy link

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 being one of them but all seem to have false positives.

Is there a plan to port this over from Turf.js? Has anyone implemented this in the past where you didn't receive false positives?

@1ec5
Copy link
Contributor

1ec5 commented May 25, 2022

Hi, your use case sounds interesting. I don’t think anyone is actively working on this function right now, but we’d welcome any contribution of a Swift implementation for it. In Swift, it would most naturally be a computed property like Polygon.selfIntersections, though it could live in a protocol shared by various geometry types to avoid duplication.

@1ec5 1ec5 changed the title Port Kinks Add property for self-intersections (kinks) in polygons May 25, 2022
@1ec5 1ec5 added JS parity feature New feature request. labels May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants