Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

geo.buffer

Buffer geographic data


Description

Buffers data in geographic (Latitude/Longitude) projection

Usage

geo.buffer(x, r, sf = FALSE, ...)

Arguments

x

A sf or sp vector class object

r

Buffer radius in meters

sf

(FALSE/TRUE) Output sf class object else sp

...

Additional arguments passed to gBuffer

Value

an sp or sf polygon class object representing buffer for each feature

Note

Projects (Latitude/Longitude) data in decimal-degree geographic projection using an on-the-fly azimuthal equidistant projection in meters centered on

Author(s)

Jeffrey S. Evans <jeffrey_evans@tnc.org>

See Also

gBuffer for gBuffer ... arguments

Examples

library(sp)
library(raster)

s <- spsample(as(extent(61.87125, 76.64458, 23.90153, 37.27042), 
              "SpatialPolygons"), n=100, type="random")
  proj4string(s) <- '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs'  
  
b <- geo.buffer(x=s, r=1000, quadsegs=100)
  plot(b[1,])
    points(s[1,], pch=20,cex=2)

spatialEco

Spatial Analysis and Modelling Utilities

v1.3-6
GPL-3
Authors
Jeffrey S. Evans [aut, cre], Melanie A. Murphy [ctb], Karthik Ram [ctb]
Initial release
2021-03-24

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.