# NOT RUN {
LASfile <- system.file("extdata", "MixedConifer.laz", package="lidR")
las = readLAS(LASfile, select = "xyz0", filter = "-drop_z_below 0")
# NOTE: This dataset is already segmented
# plot(las, color = "treeID", colorPalette = pastel.colors(200))
# Only the hulls
convex_hulls = tree_hulls(las)
plot(convex_hulls)
# The hulls + some user-defined metrics
convex_hulls = tree_hulls(las, func = ~list(Zmax = max(Z)))
spplot(convex_hulls, "Zmax")
# The bounding box
bbox_hulls = tree_hulls(las, "bbox")
plot(bbox_hulls)
# }
# NOT RUN {
concave_hulls = tree_hulls(las, "concave")
sp::plot(concave_hulls)
# }
Run the code above in your browser using DataLab