Description Usage Arguments Details Value Examples
Construct a buffer that is attenuated by effects of the surface.
1 | surfBuff(x, p, d, nQuadSegs = 30)
|
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 |
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.
An sfc object of surface buffers for each of the points in x
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.