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

Improve TopologyPreservingSimplifier to prevent edge-disjoint line collapse #925

Merged
merged 2 commits into from
Nov 1, 2022

Conversation

dr-jts
Copy link
Contributor

@dr-jts dr-jts commented Nov 1, 2022

Improves TopologyPreservingSimplifier to avoid collapsing edge-disjoint lines together when tolerance is large.

The old code would not maintain the topology of sets of edges-disjoint lines which were closer than the simplification tolerance. In the following example a set of edge-disjoint lines collapse together with a tolerance of 150:

MULTILINESTRING ((0 100, 210 110, 400 100), (0 100, 100 108, 160 130, 310 110, 400 100), (0 100, 140 90, 246 66, 300 90, 400 100))

image

With the improved code the lines are simplified as much as possible while being kept edge-disjoint:
image

Note: there is a still an issue which allows fully-disjoint edges to "cross over" each other.

Signed-off-by: Martin Davis <mtnclimb@gmail.com>
Signed-off-by: Martin Davis <mtnclimb@gmail.com>
@dr-jts dr-jts self-assigned this Nov 1, 2022
@dr-jts dr-jts merged commit 8685bcd into locationtech:master Nov 1, 2022
@dr-jts dr-jts deleted the fix-tps-multiline-collapse branch November 1, 2022 20:27
@dr-jts dr-jts changed the title Fix TopologyPreservingSimplifier to prevent edge-disjoint line collapse Improve TopologyPreservingSimplifier to prevent edge-disjoint line collapse Nov 1, 2022
@jodygarnett jodygarnett added this to the 1.20.0 milestone Aug 22, 2024
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.

2 participants