Closed Alison-97 closed 5 months ago
This is due to a flaw in the generation of the buffers of the individual segments. In particular, the segment buffer for the last segment is being generated with a short spike in the buffer offset curve:
This overlaps the previous segment buffer polygon in a way that causes a small gap in the unioned buffers:
Hopefully this is a straightforward fix to improve the buffer offset curve generation to prevent spikes.
The example geometry as WKT:
LINESTRING (200 91.37371939, 199.9906516 71.396149, 199.925198 66.39682954, 135.4977781 0.125906357, 56.41194182 0.598175835, 0.024520295 69.50077743, 0.000508719 74.50086084, 0 76.39546845)
@Alison-97 hopefully the fix in #1014 solves your issue.
Can I ask what you are using VariableBuffer for?
Description
I am encountering an issue with the Variable Buffer class. Specifically, I am working with an open LineString. Given that the LineString is open and does not intersect itself, the buffer operation should yield a simple polygon without any interior rings (holes). However, in the current implementation, the resulting polygon contains an unnecessary interior ring. This is causing a disruption in the order of the resulting polygon coordinates.
Steps to Reproduce
Here's the .Net code to reproduce the issue:
This is a plot of the inner line coordinates.![image](https://github.com/locationtech/jts/assets/97237245/8e03f5d1-3052-48f2-91ea-9ec544f951db)