surfBuff: Surface buffer

Description Usage Arguments Details Value Examples

Description

Construct a buffer that is attenuated by effects of the surface.

Usage

1
surfBuff(x, p, d, nQuadSegs = 30)

Arguments

x

points of class sfc

p

polygons of class sf, optionally with a single column indicating surface effects as distance multipliers; eg an effect of 6 increases distance across a polygon by 6

d

an integer or object of class units for radius distance; if units, then the units must be convertible to units of p

nQuadSegs

integer; number of segments per quadrant for buffers

Details

If p & x have a coordinate reference system, then surfBuff will execute the buffering geometry on the surface of the WSG84 ellipsoid, else the buffering will use euclidean geometry.

Value

An sfc object of surface buffers for each of the points in x

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
outer = matrix(c(0,0,10,0,10,10,0,10,0,8,8,8,8,2,0,2,0,0),ncol=2, byrow=TRUE)
hole = matrix(c(4,4,4,6,6,6,6,4,4,4),ncol=2, byrow=TRUE)
p1 <- c(5, 11)
p2 <- c(2, 5)
p <- sf::st_sf(geom=sf::st_sfc(sf::st_polygon(list(outer)), sf::st_polygon(list(hole))), s=c(2, 3))
x <- sf::st_sfc(sf::st_point(p1), sf::st_point(p2))
surfBuff(x, p, 8)

## End(Not run)

cmarmstrong/buffy documentation built on May 16, 2019, 2:30 a.m.