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

Reduce buffer curve short fillet segments #960

Merged
merged 2 commits into from
Feb 28, 2023

Conversation

dr-jts
Copy link
Contributor

@dr-jts dr-jts commented Feb 28, 2023

This change reduces the number of very short fillet segments created during buffer/offset curve generation.

Specifically, adjacent input segments which are at a very shallow convex (outside) angle would cause a very short single-segment fillet to be created. These were previously pruned if they were extremely short, to avoid robustness issues. It is possible to increase the segment length that is pruned, since it has essentially no effect on the quality of the offset curve. This reduces the number of short segments which appear in the final curve.

Also, this change improves the selection strategy determining which offset vertex to keep.

Example

Input: LineString with 325 vertices and length 0.0611
Buffer distance: 0.01:
Buffer vertex count:

  • Old code: 693
  • New code: 671

Example of removed fillet segment:

Segment length: 0.00034
Old Code
image

New Code
image

Signed-off-by: Martin Davis <mtnclimb@gmail.com>
Signed-off-by: Martin Davis <mtnclimb@gmail.com>
@dr-jts dr-jts merged commit 1072978 into locationtech:master Feb 28, 2023
@dr-jts dr-jts deleted the fix-buffer-curve-short-fillets branch February 28, 2023 06:15
@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