Repository navigation
RelateNG: Fix relate for polygon hole touching shell inside a shared edge - #1564
Closed
vera-rubin wants to merge 1 commit into
Closed
vera-rubin wants to merge 1 commit into
vera-rubin wants to merge 1 commit into
Conversation
…edge For polygon inputs, mutual noding of collinear overlap endpoints can miss an incident shell section at a hole/shell contact inside the shared edge. In the reported case, the contact has sections from A’s hole and B’s shell but lacks A’s shell section, so RelateNG computes incorrect containment and overlap results. Record collinear overlaps and add the overlapping segments to nodes in their interior before the nodes are evaluated.
Contributor
|
This is not how I am going to fix this in JTS. I recommend rejecting this PR and staying aligned with JTS. |
Author
|
Understood, thanks. When the JTS fix lands, the B,A case in our regression (Contains and Covers on the reproducer) may still be worth carrying over as a test. |
Contributor
Definitely, it's a canonical test. I'll add it to the Java unit tests and to the XML test suite. |
1 of 2 tasks
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RelateNG gets #1558’s matrices wrong (Within/CoveredBy/Contains/Covers false, Overlaps true) when a hole touches the shell inside a shared edge. A/B-only mutual noding of collinear overlap endpoints misses the incident shell section.
EdgeSegmentIntersector now records overlaps, and TopologyComputer adds overlapping segments’ sections before evaluating nodes inside overlaps. Paths without overlaps are unchanged.
A new regression test fails at
0d790d12b25a8e1d7310a55ec701e6bf54f73fb2and passes with the patch. All 538 CTest tests pass, and ordinary/prepared RelateNG matrices match legacy RelateOp on 12 pairs, both orders.Version: Ubuntu 24.04.5 x86_64 Release, GCC 13.3.0.
Fixes #1558
— ChipLab