Skip to content

Fix overlaps on polygons that only interact at vertices #238

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

asinghvi17
Copy link
Member

@asinghvi17 asinghvi17 commented Nov 25, 2024

Overlaps failed for a polygon like this (see the changes to test for the polygons), where the polygons overlap but only intersect at vertices (so every line-line intersection is a hinge intersection)
display
this PR attempts to move the implementation to the geom_geom_processor interface. Still fails for lines where one line covers another. Maybe I need some adjustments to the allows/requires?

cc @skygering

This fixes the test case I added
@asinghvi17 asinghvi17 requested a review from skygering November 25, 2024 21:15
@asinghvi17 asinghvi17 changed the base branch from main to as/usecore November 25, 2024 21:15
@asinghvi17 asinghvi17 changed the title Fix the overlaps predicate Fix overlaps on polygons that only interact at vertices Feb 23, 2025
@asinghvi17 asinghvi17 changed the base branch from as/usecore to main February 23, 2025 20:51
Comment on lines +88 to +91
# # Convert features to geometries
overlaps(::GI.FeatureTrait, g1, ::Any, g2) = overlaps(GI.geometry(g1), g2)
overlaps(::Any, g1, t2::GI.FeatureTrait, g2) = overlaps(g1, GI.geometry(g2))
overlaps(::FeatureTrait, g1, ::FeatureTrait, g2) = overlaps(GI.geometry(g1), GI.geometry(g2))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only thing that CI doesn't cover. We could remove it - but TBH it should be fine I think.

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