# NOT RUN {
# }
# NOT RUN {
# Establishment of working directories (optional)
# By default here we propose the current working directory of the R process
dir.data <- getwd()
dir.result <- getwd()
# Loading example data (LAS file) to dir.data
download.file("https://www.dropbox.com/s/2c3d320o3srcawb/1.las?raw=1",
destfile = file.path(dir.data, "1.las"),
mode = "wb")
# Normalizing the point cloud data as a neccesary step for detecting trees
pcd <- normalize(las = "1.las",
max.dist = 15, min.height = 0.25, max.height = 25,
id = "1", file = "1.txt",
dir.data = dir.data, dir.result = dir.result)
# Tree detection without considering arguments
# For this case study, TLS resolution was established as:
# point.dist = 7.67 mm and tls.dist = 10 m
tree.list.tls <- tree.detection(data = pcd,
tls.resolution = list(point.dist = 7.67, tls.dist = 10),
dir.result = dir.result)
# Tree detection considering several arguments
tree.list.tls <- tree.detection(data = pcd,
dbh.min = 7.5, dbh.max = 60,
tls.resolution = list(point.dist = 7.67, tls.dist = 10),
breaks = 1.3,
dir.result = dir.result)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab