Search code examples
rbufferr-sf

Make a flat buffer using simple features st_buffer


Is it possible to make a "flat" buffer around lines in the same way as gbuffer work:

 buf_t <- gBuffer(py,capStyle="FLAT", width=py$width, byid=T)

for sf it works with round buffers, but I cannot find information on flat buffers:

buf_sf <- st_buffer(st_as_sf(py2),dist = py$width, SomeWayToMakeItFlat? = T)

Solution

  • sf has implemented this now.

    buf_sf <- st_buffer(st_as_sf(py2),dist = py$width, endCapStyle = 'FLAT')