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

How to create a buffer with flat linecap? #1257

Closed
mickeyjohn opened this issue Feb 12, 2018 · 1 comment
Closed

How to create a buffer with flat linecap? #1257

mickeyjohn opened this issue Feb 12, 2018 · 1 comment

Comments

@mickeyjohn
Copy link

mickeyjohn commented Feb 12, 2018

Hi everyone,

Turf is a very nice geo lib. When using the .buffer function. It can create a nicely buffer polygon with a round linecap around the given polyline. My question is how to create a polyline with flat linecap with turf? Is there any way to achieve that?

Best Regards,
John

@rowanwins
Copy link
Member

Hi @mickeyjohn

At the moment it's not possible with Turf. Using the jsts lib (on which Turf currently relies) I believe it's doable.

We do already have an item to support endcap strategies so Im going to close this in favour of that issue. We're currently trying to remove the dependency on jsts as it is a very large library but when we do we'll try and make sure we have those endcap options in place.

Cheers
Rowan

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

No branches or pull requests

2 participants