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 TopologyPreservingSimplifier to prevent jumping components causing incorrect topology #1024

Merged
merged 15 commits into from
Dec 4, 2023

Conversation

dr-jts
Copy link
Contributor

@dr-jts dr-jts commented Dec 3, 2023

This PR fixes a long-standing bug in TopologyPreservingSimplifier which created incorrect output due to simplified edges "jumping" over components in the input geometry.

The fix handles both polygonal and linear inputs. (Previously, polygonal inputs with "jumps" produced invalid results. Linear inputs produced results whose topology did not match the input).

Before fix

image

After fix

image

Fixes #428.

Porting this to GEOS will fix the following issues:

@dr-jts dr-jts changed the title Fix TopologyPreservingSimplifier to avoid creating invalid topology by jumping components Fix TopologyPreservingSimplifier to prevent incorrect topology from jumping components Dec 4, 2023
@dr-jts dr-jts merged commit 7d9bf9f into locationtech:master Dec 4, 2023
2 checks passed
@dr-jts dr-jts deleted the fix-tpsimplifier-cross-component branch December 4, 2023 22:24
@dr-jts dr-jts changed the title Fix TopologyPreservingSimplifier to prevent incorrect topology from jumping components Fix TopologyPreservingSimplifier to prevent jumping components causing incorrect topology Dec 5, 2023
pramsey added a commit to libgeos/geos that referenced this pull request Dec 8, 2023
…g incorrect topology (#1012)

Fixes a long-standing bug in TopologyPreservingSimplifier which created incorrect output due to simplified edges "jumping" over components in the input geometry.

The fix handles both polygonal and linear inputs. (Previously, polygonal inputs with "jumps" produced invalid results. Linear inputs produced results whose topology did not match the input).

See locationtech/jts#1024
pramsey added a commit to libgeos/geos that referenced this pull request Dec 8, 2023
…g incorrect topology (#1012)

Fixes a long-standing bug in TopologyPreservingSimplifier which created incorrect output due to simplified edges "jumping" over components in the input geometry.

The fix handles both polygonal and linear inputs. (Previously, polygonal inputs with "jumps" produced invalid results. Linear inputs produced results whose topology did not match the input).

See locationtech/jts#1024
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.

SimplifyTP produces invalid polygon due to skipping over hole
1 participant