geo_buffer: Perform a buffer operation on a temporary projected CRS

Description Usage Arguments See Also Examples

View source: R/geo_projected.R

Description

This function solves the problem that buffers will not be circular when used on non-projected data.

Usage

1

Arguments

shp

A spatial object with a geographic CRS (e.g. WGS84) around which a buffer should be drawn

dist

The distance (in metres) of the buffer (when buffering simple features)

width

The distance (in metres) of the buffer (when buffering sp objects)

...

Arguments passed to the buffer (see ?rgeos::gBuffer or ?sf::st_buffer for details)

See Also

buff_geo

Examples

1
2
3
4
5
6
buff_sp = geo_buffer(routes_fast, width = 100)
class(buff_sp)
plot(buff_sp, col = "red")
routes_fast_sf = sf::st_as_sf(routes_fast)
buff_sf = geo_buffer(routes_fast_sf, dist = 50)
plot(buff_sf$geometry, add = TRUE)

stplanr documentation built on March 18, 2018, 2:29 p.m.