create_cost_corridor {leastcostpath} | R Documentation |
creates a cost corridor
Description
Combines and averages the accumulated cost surfaces from origin-to-destination and destination-to-origin to identify areas of preferential movement that takes into account both directions of movement
Usage
create_cost_corridor(x, origin, destination, rescale = FALSE)
Arguments
x |
|
origin |
|
destination |
|
rescale |
|
Value
SpatRaster
Author(s)
Joseph Lewis
Examples
r <- terra::rast(system.file("extdata/SICILY_1000m.tif", package="leastcostpath"))
slope_cs <- create_slope_cs(x = r, cost_function = "tobler", neighbours = 4)
locs <- sf::st_sf(geometry = sf::st_sfc(
sf::st_point(c(839769, 4199443)),
sf::st_point(c(1038608, 4100024)),
crs = terra::crs(r)))
cc <- create_cost_corridor(x = slope_cs, origin = locs[1,], destination = locs[2,], rescale = TRUE)
[Package leastcostpath version 2.0.12 Index]