@turf/kinks v7.0.0 doesn't report self-intersection points in polygon (v6.5.0 does)
arkus7 opened this issue · comments
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/
@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?