gr_buffer_geo {grwat} | R Documentation |
Quasi-geographic buffering
Description
Generate the buffer of spatial object in geographic coordinates. The function transforms the object into Azimuthal equidistant projection, then buffers it by the specified radius and then reprojects into geographical coordinate system (WGS84)
Usage
gr_buffer_geo(g, bufsize)
Arguments
g |
|
bufsize |
Numeric value of a buffer distance, in meters. |
Value
sf
or sfg
object, buffered to bufsize
and projected into geographic coordinates (WGS84).
Examples
if (require("sf")) {
library(grwat)
library(ggplot2)
path = system.file("extdata", "spas-zagorye.gpkg", package = "grwat")
basin = sf::st_read(path, layer = 'basin') # read basin region
basin_buffer = gr_buffer_geo(basin, 25000)
ggplot() +
geom_sf(data = basin_buffer, fill = 'orangered', color = 'black') +
geom_sf(data = basin, fill = 'steelblue', color = 'black')
}
[Package grwat version 0.0.4 Index]