hf_survey | R Documentation |
Survey entire landscape to calculate accumulated cost of travel from one or more start points.
hf_survey(x, from)
x |
a cost |
from |
an |
a SpatRaster
with accumulated travel costs from each start point.
library(sf) library(terra) fn <- system.file("extdata/red_butte_dem.tif", package = "hiker") red_butte_dem <- rast(fn) from <- st_sf(geometry = st_sfc(st_point(c(432000, 4514000)), st_point(c(434000, 4518000)), crs = 26912)) terrain <- hf_terrain(red_butte_dem) cost_surface <- hf_survey(terrain, from) plot(cost_surface) plot(st_geometry(from), pch = 19, col = "red2", add = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.