Rolling back ignoreSelfIntersections to 6.5.0 behaviour #2728
Replies: 6 comments 6 replies
-
History as I understand it. Will amend as comments and corrections are suggested. 6.5.0 (mid-2021) shipped with an in house algorithm for line-intersect. There is no mention of self intersections and no way to override the behaviour. The (to be confirmed) belief is this implementation always ignored self intersections. In 2022 line-intersect was rewritten to use the third party sweepline-intersections library. This included the function changing to recognise self intersections by default. It's not clear yet why this change was made or if it was intended. Over the ensuing couple of years the ignoreSelfIntersections option has been added in a few more places. The default value chosen may have been based on an incorrect assumption that recognising self intersections was the default in 6.5.0 because that was what was in the development branch. Eventually, releasing 7.0.0 (mid-2024) shipped an undocumented breaking change to line-intersect (and other packages). Possibly impacted packages:boolean-crosses To do
Behaviour matrix - lines
Behaviour matrix - polygons
|
Beta Was this translation helpful? Give feedback.
-
Hi @pm0u. Would you mind taking a look at the above? Can you think of any other packages we should check? Also, you mention on #2722 there is no workaround for booleanCrosses (agreed). I don't see booleanCrosses misbehaving for the test cases above though. Nor any existing issues along those lines. Do you have a test case where it is being affected by this ignores issue? |
Beta Was this translation helpful? Give feedback.
-
Hi @01100100. Copying you in on this issue because it touches on #2633. It looks like we are going to be changing ignoreSelfIntersections to default to true - Turf wide. Within the context of your PR I think this is ok as that was all about letting people override ignore to true. If true becomes the default they're not affected. Please have a read of the above and let me know if I've got anything wrong. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Hello Mr Saucepan, Sounds good with me, happy the changes helped. Best regards, |
Beta Was this translation helpful? Give feedback.
-
If I remember correctly, the default pre 6.5.0 behaviour was that it was ignored, hence false. Just so your aware. Maybe this change will need some tests updating... 🧪 |
Beta Was this translation helpful? Give feedback.
-
Let me know if you want me to implement any changes here and I would be happy to help ⛑️ |
Beta Was this translation helpful? Give feedback.
-
Discussion to prepare for a PR that will revert ignoreSelfIntersections behaviour to what is in 6.5.0. With the release of v7 we seem to have introduced multiple breaking changes to this area and they should be reverted ASAP.
Some questions to answer:
Covers issues:
#2722
#2707
#2700
#2633
#2585
Beta Was this translation helpful? Give feedback.
All reactions