-
Notifications
You must be signed in to change notification settings - Fork 944
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
booleanIntersects false positive #2707
Comments
I've just hit the same issue myself with these two shapes. Side-note: it also it seems to run significantly slower than it used to on 6.5.0 |
Also experiencing changed/broken behavior. Same as others, this now says that any (?) line seems to intersect any polygon. 6.5 repro (false) These geometries do not in fact intersect Fiddled more - seems to be once our line has >= 500 coordinates the line all of a sudden intersects. Edit: Happenstance, seems to be the particular coordinates. Updated repro in the sweepline issue that is very minimal and stripped back. |
Looks like this comes back to |
In my case, this was because one of the geometries included a self intersection. I would highly suggest anyone that is running into issues with this alg try out the debugger as called out in the readme for sweepline and observe what it is finding as intersections to see if this is your issue. I believe this does represent an unannounced breaking change, as before I don't think that self intersections would have been reported based on my admittedly limited understanding of the previous implementation turf/packages/turf-line-intersect/index.ts Lines 68 to 83 in 5375941
I believe the above algorithm previously compared 2 geometries against each other and did not compare a geometry to itself at any point. |
Experiencing the same. A polygon in California is somehow intersecting with a polygon in Maine. Setting |
The code:
prints out:
Visually (polygon is in red):
Cutting the multipolygon down a bit solves the problem, which is why I made it so big.
The text was updated successfully, but these errors were encountered: