buffer_validation {leastcostpath} | R Documentation |
Calculate the similarity of a least-cost path to a known route
Description
Calculates the similarity of a least-cost path to a known route using the buffer method proposed by Goodchild and Hunter (1997)
Usage
buffer_validation(lcp, comparison, dist)
Arguments
lcp |
|
comparison |
|
dist |
|
Value
data.frame
Author(s)
Joseph Lewis
Examples
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))
[Package leastcostpath version 2.0.12 Index]