matrix of geographic unprojected coordinates (i.e., in EPSG:4326).
Columns must be "longitude" and "latitude", in that order.
radius
(numeric) radius of buffer in meters.
by_point
(logical) whether or not to do buffers by point. If FALSE, the
default, buffer polygons that overlap will be dissolved to obtain an only
feature. Default = 100.
n_segments
(numeric) number of segments to approximate a circle.
wrap_antimeridian
(logical) whether or not to wrap buffers in the
antimeridian when they overpass it.
Value
A SpatialPolygons object of buffered points. Final projection is WGS84
(EPSG:4326).
Details
The process is done using an algorithm that calculates the buffer in the North
Pole and then rotates this buffer into the actual location. The rotation is
effected by converting the original buffer to geocentric Cartesian (XYZ)
coordinates. A matrix multiplication helps to rotate those coordinates
along the Prime Meridian to the target latitude, converting the coordinates
back to Geographic (WGS84). Then the buffer is spun around the Earth's
axis by adding the target longitude to each second coordinate.
The algorithm was developed by a moderator of the Geographic Information
Systems Stack Exchange (online community). More details are available available
at the following
site.