create_accum_cost {leastcostpath} | R Documentation |
creates an accumulated cost surface
Description
Creates an accumulated cost surfaces from one or more origins
Usage
create_accum_cost(
x,
origins,
FUN = mean,
rescale = FALSE,
check_locations = FALSE
)
Arguments
x |
|
origins |
|
FUN |
|
rescale |
|
check_locations |
|
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)),
sf::st_point(c(907695, 4145478)),
crs = terra::crs(r)))
cc <- create_accum_cost(x = slope_cs, origins = locs, FUN = mean, rescale = FALSE)
[Package leastcostpath version 2.0.12 Index]