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

Make line intersection computation more robust #989

Merged
merged 1 commit into from
Jul 4, 2023

Conversation

dr-jts
Copy link
Contributor

@dr-jts dr-jts commented Jul 2, 2023

Changes the computation of line intersections to use DoubleDouble arithmetic, for improved accuracy. This uses the existing CGAlgorithmsDD.intersection implementation.

CGAlgorithmsDD.intersection is significantly slower than the original FP implementation. But since in typically use intersection calculation is a small fraction of overall processing, this seems to have almost no practical performance impact.

This does change the results of some intersection cases by a small amount. A few unit tests had to be changed to reflect this.

Fixes #396.
Fixes #270
See also libgeos/geos#933 for another case which is fixed by this change.

@dr-jts dr-jts self-assigned this Jul 2, 2023
@dr-jts dr-jts merged commit 668c4bc into locationtech:master Jul 4, 2023
1 check passed
@dr-jts dr-jts deleted the fix-relate-intersection branch July 4, 2023 15:47
@jodygarnett jodygarnett added this to the 1.20.0 milestone Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect Relate value due to noding Inconsistent results of intersects and intersection
2 participants