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

Fix vertex intersection in OverlayArea #1043

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

tanelk
Copy link

@tanelk tanelk commented Mar 17, 2024

Second try at fixing OverlayArea.
It seems to me, that vertex-vertex intersection could not be done, when only looking at pairs of edges. Instead all four have to be looked at together.

For this I replaced STRtree with SegmentSetMutualIntersector, because it has access to previous and next segments on both lines.

Added several new test cases and moved common ones into a shared base for simple and regular overlay area tests.

Covers #1040 and #1042

@tanelk
Copy link
Author

tanelk commented Mar 17, 2024

Did not change SimpleOverlayArea, will get to it after initial review. Perhaps this approach is not OK.
SimpleOverlayAreaTest will fail until so.

Signed-off-by: tanelk <[email protected]>
Signed-off-by: tanelk <[email protected]>
@tanelk tanelk changed the title Fix vertex-vertex intersection in OverlayArea Fix vertex intersection in OverlayArea Mar 17, 2024
Signed-off-by: tanelk <[email protected]>
Signed-off-by: tanelk <[email protected]>
Signed-off-by: tanelk <[email protected]>
# Conflicts:
#	modules/lab/src/main/java/org/locationtech/jts/operation/overlayarea/OverlayArea.java
@tanelk
Copy link
Author

tanelk commented Mar 22, 2024

I went ahead and fixed the SimpleOverlayArea also. The tests should now all pass

@tanelk
Copy link
Author

tanelk commented Apr 16, 2024

Pinging @dr-jts for a review on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant