dtm <- mc_volc()
start <- mc_volc_loc()
destin <- mc_destin_loc()
surf <- mc_surface(dtm, funct = "t", move = 8)
lcp <- mc_paths(surf, origin = start, destin = destin)
lcp$paths # sf object: costs, lengths, geometries
plot(lcp)
# paths back to the origin (anisotropy makes them differ):
lcp2 <- mc_paths(surf, start, destin[2, ], return.base = TRUE)
plot(lcp2)
Run the code above in your browser using DataLab