# \donttest{
# Establishment of working directories (optional)
# Establishment of working directories using tempdir() to avoid leaving files in
# user filespace
dir.data <- tempdir()
dir.result <- tempdir()
# Loading example data (LAZ files) to dir.data
download.file(
"www.dropbox.com/scl/fi/hzzrt0a39crdy6uvcj9el/PinusSylve1.laz?rlkey=svpwvorkm8889fgbnj14ns1f2&dl=1",
destfile = file.path(dir.data, "PinusSylvestris1.laz"),
mode = "wb")
download.file(
"www.dropbox.com/scl/fi/zeszze31jh5m1g4o3ns1o/PinusSylve2.laz?rlkey=wx72bi6ggdc7wedwgzupekp9k&dl=1",
destfile = file.path(dir.data, "PinusSylvestris2.laz"),
mode = "wb")
# Tree detection (TLS single-scan aproach)
id <- c("PinusSylvestris1", "PinusSylvestris2")
center.coord <- data.frame(id = id,
x = rep(0, length(id)),
y = rep(0, length(id)))
tree.tls <- tree.detection.several.plots(las.list = c("PinusSylvestris1.laz",
"PinusSylvestris2.laz"),
id.list = id,
scan.approach = "single",
center.coord = center.coord,
tls.resolution = list(point.dist = 7.67, tls.dist = 10),
max.dist = 7.5,
breaks = 1.3,
threads = 2,
dir.data = dir.data, dir.result = dir.result)
# }
Run the code above in your browser using DataLab