powered by
converts conductanceMatrix to SpatRaster
rasterise(x)
spatRaster
conductanceMatrix
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) cs_rast <- rasterise(slope_cs)
Run the code above in your browser using DataLab