create_cs {leastcostpath} | R Documentation |
Creates a cost surface from a SpatRaster
Description
Creates a cost surface using the values in the supplied SpatRaster. This function also provides for the inclusion of maximum slope traversable
The supplied 'spatRaster' object must have a projected CRS
Usage
create_cs(
x,
neighbours = 16,
dem = NULL,
max_slope = NULL,
exaggeration = FALSE
)
Arguments
x |
|
neighbours |
|
dem |
|
max_slope |
|
exaggeration |
|
Value
conductanceMatrix
that numerically expresses the difficulty of moving across a surface based on the provided SpatRaster
Author(s)
Joseph Lewis
Examples
r <- terra::rast(system.file("extdata/SICILY_1000m.tif", package="leastcostpath"))
cs1 <- create_cs(x = r, neighbours = 16, dem = NULL, max_slope = NULL)
cs2 <- create_cs(x = r, neighbours = 16, dem = r, max_slope = 10)