View source: R/create_accum_cost.R
create_accum_cost | R Documentation |
Creates an accumulated cost surfaces from one or more origins
create_accum_cost(
x,
origins,
FUN = mean,
rescale = FALSE,
check_locations = FALSE
)
x |
|
origins |
|
FUN |
|
rescale |
|
check_locations |
|
SpatRaster
Joseph Lewis
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.