This function generates circular buffers around geographic points from a table containing latitude, longitude, and buffer radius information. The input data must include Latitude and Longitude columns in decimal degrees and a numeric Buffer column indicating the radius in meters. Optionally, an ID column can be provided to distinguish points with identical locations or buffer sizes.

Pbuffer(Data, ID = NA, Projected = FALSE)

Arguments

Data

A data.frame or data.table containing point coordinates (Latitude, Longitude) in decimal degrees and Buffer in meters. NA values are removed.

ID

Optional. The column name for grouping points with identical locations. Default is NA.

Projected

Logical. If TRUE, the output will be in the projected coordinate system EPSG:3395 (Mercator projection). If FALSE, the output will be in geographic coordinates EPSG:4326 (WGS84).

Value

A SpatVect object (from the terra package) representing the circular buffer polygons.