% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geo_projected.R
\name{geo_buffer}
\alias{geo_buffer}
\title{Perform a buffer operation on a temporary projected CRS}
\usage{
geo_buffer(shp, dist = NULL, width = NULL, ...)
}
\arguments{
\item{shp}{A spatial object with a geographic CRS (e.g. WGS84)
around which a buffer should be drawn}

\item{dist}{The distance (in metres) of the buffer (when buffering simple features)}

\item{width}{The distance (in metres) of the buffer (when buffering sp objects)}

\item{...}{Arguments passed to the buffer (see \code{?rgeos::gBuffer} or \code{?sf::st_buffer} for details)}
}
\description{
This function solves the problem that buffers will not be circular when used on
non-projected data.
}
\examples{
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)
geo_buffer(routes_fast_sf$geometry, dist = 50)
}
