library(quadtree)
habitat <- terra::rast(system.file("extdata", "habitat.tif", package="quadtree"))
qt <- quadtree(habitat, .1)
start_point <- c(6989, 34007)
end_point <- c(33015, 38162)
lcpf <- lcp_finder(qt, start_point)
lcp <- find_lcp(lcpf, end_point)
summary(lcpf)
Run the code above in your browser using DataLab