hf_rasterize | R Documentation |
Converts a cost terrain
into a raster representing
travel cost, specifically the average cost of moving from/to each
cell. Mostly useful for visualizing with terra::plot()
as a sanity check.
hf_rasterize(x)
x |
a cost |
a SpatRaster
with travel cost values.
library(terra) fn <- system.file("extdata/red_butte_dem.tif", package = "hiker") red_butte_dem <- rast(fn) terrain <- hf_terrain(red_butte_dem) r_terrain <- hf_rasterize(terrain)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.