Open Sean12oshea opened 2 years ago
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.
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?