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 VariableBuffer to handle zero distances #997

Merged
merged 2 commits into from
Aug 9, 2023

Conversation

dr-jts
Copy link
Contributor

@dr-jts dr-jts commented Aug 9, 2023

Fixes the VariableBuffer segment buffer generation to avoid numerical precision issues at vertices with zero buffer distances. Also removes repeated points from generated buffers.

  • For a single vertex buffer distance = 0, the buffer narrows to a point at that vertex
image
  • If the vertex buffer distance = 0 at both ends of a input line segment, no buffer is generated around that segment
image

Fixes #995

@dr-jts dr-jts merged commit 495dc57 into locationtech:master Aug 9, 2023
1 check passed
@dr-jts dr-jts deleted the fix-var-buffer-zero-dist branch August 9, 2023 17:31
Alison-97 added a commit to Alison-97/NetTopologySuite that referenced this pull request Aug 18, 2023
This patch is adopted from the fix in JTS (locationtech/jts#997)
@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.

VariableBuffer fails when vertex distance = 0
2 participants