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

@turf/kinks v7.0.0 doesn't report self-intersection points in polygon (v6.5.0 does) #2627

Closed
arkus7 opened this issue Jun 19, 2024 · 1 comment · Fixed by #2693
Closed

@turf/kinks v7.0.0 doesn't report self-intersection points in polygon (v6.5.0 does) #2627

arkus7 opened this issue Jun 19, 2024 · 1 comment · Fixed by #2693
Milestone

Comments

@arkus7
Copy link

arkus7 commented Jun 19, 2024

I've been using @turf/kinks v6.5.0 to find whether the polygon has some self-intersecting lines inside.

The geometry that on v6.5.0 returned 3 points as a result of the kinks(geometry) call, in v7.0.0 returns no points.

Here is a gist with the GeoJSON(s): https://gist.github.com/arkus7/bbd0bad3a4d81eb6edc5d24f43ad9f7c

Example on JSFiddle using v7.0.0 https://jsfiddle.net/abefhm5o/1/
This shows that the newest version doesn't report the kinks the same as v6.5.0: https://jsfiddle.net/o1L8sd4u/

@smallsaucepan
Copy link
Member

@rowanwins, would you mind casting an eye over this? Between 6.5.0 and 7 kinks switched to sweepline-intersections.

A stripped down version of the test data above: https://gist.github.com/smallsaucepan/75d9b9b841586cf22127ea34508af498

Running through 6.5.0 finds the self intersection. Although duplicated 3 times?
Running through 7.0.0 returns an empty feature collection {"type":"FeatureCollection","features":[]}

Any thoughts on where to start troubleshooting?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants