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

Single-side buffering closes shape only sometimes #1008

Open
nubblesite opened this issue Oct 18, 2023 · 2 comments
Open

Single-side buffering closes shape only sometimes #1008

nubblesite opened this issue Oct 18, 2023 · 2 comments

Comments

@nubblesite
Copy link

I am performing single-sided buffering and then looping through the new offset curve to remove all points within offsetDistance - 0.01 of each point on the original curve. This results in a nice single-sided buffer like so:

image

The problem is that when I increase the offset distance beyond a certain amount, the first and last points become connected by a line segment (the photo above is 7.5 offset distance, the one below is 8.0):
image

I'm aware that buffering will always return either a polygon or multipolygon (closed shape). That being said, I would like to prevent the first and last points from "connecting" together entirely. Any ideas as to why this would happen only beyond a certain offset distance?

@nubblesite
Copy link
Author

OK, this issue is caused by the final offset curve not maintaining point order past a certain offset distance. I guess there's no way to ensure that the first and last points in the offset curve correspond to the first and last points in the original curve, since the buffer operation doesn't guarantee point order. Is that right?

@dr-jts
Copy link
Contributor

dr-jts commented Oct 18, 2023

You'll have to provide more information about what API you are using, and what the input data is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants