Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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 class 'SpatialPoints'
construct_buffer(coords, shape, size, return_sp = TRUE, verbose = TRUE)

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

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

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

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

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

## S3 method for class '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

coords <- matrix(c(10, 5, 25, 15, 5, 25), ncol = 2, byrow = TRUE)
construct_buffer(coords = coords, shape = "square", size = 5)

landscapemetrics

Landscape Metrics for Categorical Map Patterns

v1.5.2
GPL-3
Authors
Maximillian H.K. Hesselbarth [aut, cre] (<https://orcid.org/0000-0003-1125-9918>), Marco Sciaini [aut] (<https://orcid.org/0000-0002-3042-5435>), Jakub Nowosad [aut] (<https://orcid.org/0000-0002-1057-3721>), Sebastian Hanss [aut] (<https://orcid.org/0000-0002-3990-4897>), Laura J. Graham [ctb] (Input on package structure), Jeffrey Hollister [ctb] (Input on package structure), Kimberly A. With [ctb] (Input on package structure), Florian Privé [ctb] (Original author of underlying C++ code for get_nearestneighbour() function), Project Nayuki [ctb] (Original author of underlying C++ code for get_circumscribingcircle and lsm_p_circle), Matt Strimas-Mackey [ctb] (Bugfix in sample_metrics())
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.