View source: R/buffer_validation.R
buffer_validation | R Documentation |
Calculates the similarity of a least-cost path to a known route using the buffer method proposed by Goodchild and Hunter (1997)
buffer_validation(lcp, comparison, dist)
lcp |
|
comparison |
|
dist |
|
data.frame
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)),
crs = terra::crs(r)))
lcp1 <- create_lcp(x = slope_cs, origin = locs[1,], destination = locs[2,])
lcp2 <- create_lcp(x = slope_cs, origin = locs[2,], destination = locs[1,])
buffer_validation(lcp = lcp1, comparison = lcp2, dist = c(1000, 2500, 5000, 10000))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.