Convert Points to Buffered Polygons Based on Area
convert_points_polygon.RdThis function converts POINT or MULTIPOINT geometries into circular polygons using the specified area attribute to calculate a radius (assuming the area is in hectares or another square unit). The buffer is created in a projected CRS (default: Mollweide, EPSG:54009) and then transformed back to the input CRS. Optionally, original polygon features can be retained and combined with the buffered features.
Utilisation
convert_points_polygon(
sf_layer,
area_attr = "REP_AREA",
area_crs = "ESRI:54009",
nQuadSegs = 50,
append_original_polygons = TRUE,
area_multiplier = 1e+06
)Arguments
- sf_layer
An
sfobject containing geometries, including points or multipoints and an area column.- area_attr
Character. Name of the attribute column that contains site area (default:
"REP_AREA").- area_crs
Character. CRS used for buffering operation (default:
"ESRI:54009"= World Mollweide).- nQuadSegs
Integer. Number of segments per circle quadrant for buffering (default:
50).- append_original_polygons
Logical. If
TRUE, appends original polygons to buffered features (default:TRUE).- area_multiplier
Numeric. Multiplier applied to the area attribute to convert units (e.g.,
1e4for hectares to m2).