-
Notifications
You must be signed in to change notification settings - Fork 288
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
Feature request: st_buffer single-sided support via GEOSOffsetCurve #1001
Comments
Sounds like a good plan, and relatively straightforward. PR's welcome! |
Hi I am also interested in this feature or a similar feature. When I read the documentation of st_buffer, In the details section, it indicates that st_buffer functionality is based/inspired (?) on ST_Buffer of postgis. And that postgis page shows a parameter thank you. |
It uses the same library (GEOS) that postgis uses. I can't really figure this out from reading |
Thanks! I think this ticket was about the single-sided buffer, I don't see how |
Yes, I misread the ticket and thought that a linestring output was desired. That not being the case, GEOSBufferWithParams would be the way to go. |
This now gives a single-sided buffer with plot(st_buffer(st_linestring(rbind(c(0,0), c(10,0))), -2, singleSide=T), axes=T) the direction being determined by the sign of the buffer size. |
Thank you, how long does it take to get into CRAN or do you advice via devtools? |
I don't know; I merged this into master, so it's the next release - 1 month from now, or earlier since we see an error on one of the CRAN check machines. |
I'd like to be able to make single-sided buffers of
LINESTRING
objects. Has this functionality been on anyone's radar?It seems tricky to produce single-sided buffers in R using other methods, such as this or this, except for the special cases these examples describe. People make single-sided buffers with other spatial software, suggesting it's a function that would be useful.
The functionality to make single-sided buffers appears to be offered by
GEOSOffsetCurve
withingeos_c.h
and the interface looks similar to the functions already used byst_buffer
. Would this be straightforward to incorporate?Thanks very much for your work on this package.
The text was updated successfully, but these errors were encountered: