-
Notifications
You must be signed in to change notification settings - Fork 369
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
RelateCompute intersection report inconsistent for lines and boundary points #1064
Comments
This is not a bug, but a limitation in the ability to compute the relate matrix due to numeric rounding. In order to correctly compute the relate matrix for two lines the node point must be computed (see locationtech/jts#396 for an example of a case which requires noding for correct evaluation). However, due to numeric roundoff the computed node point equals an endpoint of line B, even though the robust It's not clear that there is an algorithm which can avoid noding, since this would cause an inconsistency in other cases. Another future option is to support evaluating predicates with a distance tolerance. This will essentially allow avoiding inconsistency due to roundoff. (However, note that this may not be a solution in itself - when used as part of a bigger process, the entire process must be designed to support using a tolerance.) |
For the record, GEOS-3.8 gives a different intersection matrix for the two lines, saying there is no interior/boundary intersection. Did 3.8 not have this limitation ?
|
An XML test for this case was added in #1092 - the test passes in 3.8 branch, fails in main branch:
|
CI confirming the problem in main branch: https://github.com/libgeos/geos/actions/runs/8982099329/job/24668988763?pr=1093#step:8:7913 (PR GH-1093) CI confirming there is no problem in 3.8 branch: https://github.com/libgeos/geos/actions/runs/8982102259/job/24668979871?pr=1092#step:4:6239 (PR GH-1092) |
This might be due to the change in line intersection computation math, from Note that 3.8 is reporting that there is no intersection between the lines at all. However, the 3.12 |
RelateComputer says there's an intersection between line A interior and and line B boundary but says there is no intersection
between B boundary and A.
Line A: 010200000002000000B02EA9C2AE5430400E3994256830514037F136E82055304039FAE86851305140
Line B: 01020000000200000064AB380D714E3040A38E9F0E1F305140E798A2D4E85430405F5969945C305140
A Interior intersects B boundary in dim = 0
A has no intersection with Boundary(B)
Reported in https://lists.osgeo.org/pipermail/geos-devel/2024-March/011012.html and confirmed in #968 (comment)
The text was updated successfully, but these errors were encountered: