Tree height listing and export #741
-
Dear Author! My question would be, how can it be solved so that not only a dot is placed on the top of the detected trees, but their height (Z)?
In addition, I would like to export the LAS file in some 3D format so that it is connected with the tree height points. Thanks for the help! |
Beta Was this translation helpful? Give feedback.
Answered by
Jean-Romain
Feb 26, 2024
Replies: 1 comment 2 replies
-
You can use library(lidR)
LASfile <- system.file("extdata", "MixedConifer.laz", package="lidR")
las <- readLAS(LASfile, select = "xyzc", filter = "-inside_circle 481300 3812980 25")
dtm <- rasterize_terrain(las, algorithm = tin())
ttops <- locate_trees(las, lmf(ws = 5))
xy = sf::st_coordinates(ttops)
x <- plot(las)
add_treetops3d(x, ttops)
rgl::texts3d(xy[,1]-x[1], xy[,2]-x[2], xy[,3]+1.5, round(xy[,3],0), col = "white") |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
mloricn2
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use
rgl::texts3d