calcBoundaryData {raptr} | R Documentation |
Calculate boundary data for planning units
Description
This function calculates boundary length data. Be aware that this function is designed with performance in mind, and as a consequence, if this function is used improperly then it may crash R. Furthermore, multipart polygons with touching edges will likely result in inaccuracies.
Usage
calcBoundaryData(x, tol, length.factor, edge.factor)
## S3 method for class 'PolySet'
calcBoundaryData(x, tol = 0.001, length.factor = 1, edge.factor = 1)
## S3 method for class 'SpatialPolygons'
calcBoundaryData(x, tol = 0.001, length.factor = 1, edge.factor = 1)
## S3 method for class 'sf'
calcBoundaryData(x, tol = 0.001, length.factor = 1, edge.factor = 1)
Arguments
x |
|
tol |
|
length.factor |
|
edge.factor |
|
Value
A data.frame
with 'id1' (integer
), 'id2'
(integer
), and 'amount' (numeric
) columns.
See Also
This function is based on the algorithm in QMARXAN https://github.com/tsw-apropos/qmarxan for calculating boundary length.
Examples
## Not run:
# simulate planning units
sim_pus <- sim.pus(225L)
# calculate boundary data
bound.dat <- calcBoundaryData(sim_pus)
# print summary of boundary data
summary(bound.dat)
## End(Not run)