landscapemetrics (version 1.4.4)

construct_buffer: construct_buffer

Description

Internal function to construct plot area around coordinates

Usage

construct_buffer(coords, shape, size, return_sp, verbose)

# S3 method for SpatialPoints construct_buffer(coords, shape, size, return_sp = TRUE, verbose = TRUE)

# S3 method for SpatialPointsDataFrame construct_buffer(coords, shape, size, return_sp = TRUE, verbose = TRUE)

# S3 method for MULTIPOINT construct_buffer(coords, shape, size, return_sp = TRUE, verbose = TRUE)

# S3 method for POINT construct_buffer(coords, shape, size, return_sp = TRUE, verbose = TRUE)

# S3 method for sf construct_buffer(coords, shape, size, return_sp = TRUE, verbose = TRUE)

# S3 method for sfc construct_buffer(coords, shape, size, return_sp = TRUE, verbose = TRUE)

# S3 method for matrix construct_buffer(coords, shape, size, return_sp = TRUE, verbose = TRUE)

Arguments

coords

SpatialPoints or 2-column matrix with coordinates of sample points

shape

String specifying plot shape. Either "circle" or "square"

size

Size of sample plot. Equals the radius for circles or the side-length for squares in mapunits

return_sp

If true, SpatialPolygons are returned.

verbose

Print warning messages.

Value

matrix or SpatialPolygons

Examples

Run this code
# NOT RUN {
coords <- matrix(c(10, 5, 25, 15, 5, 25), ncol = 2, byrow = TRUE)
construct_buffer(coords = coords, shape = "square", size = 5)

# }

Run the code above in your browser using DataLab