adtree2qsm | R Documentation |
Transform an adTree output into a QSM file, simplifies it and computes tree volume and DBH
adtree2qsm(mesh, min_diameter = 0.02)
mesh |
a mesh3d class object build from a .obj output from adTree. |
min_diameter |
numeric. The minimum diameter to keep in the qsm and mesh |
a simplidfied mesh, a qsm object (i.e. a set of cylinders with startxyz, endxyz, ID, radius and length), the estimates for DBH, tree volume, tree total length and volume and legth by 5cm diameter class
# import the obj file output from adTree
file = system.file("extdata", "adtree_qsm.obj", package="lidUrb")
mesh = Morpho::obj2mesh(file)
# plot the original mesh
rgl::open3d()
rgl::shade3d(mesh,col="black",add=T)
# transform the adTree mesh into a qsm file, simplify the mesh and compute
# some woody structure features
qsm = lidUrb::adtree2qsm(mesh)
# plot the simplified mesh
rgl::open3d()
rgl::shade3d(qsm$mesh,col="black",add=T)
# plot simplified mesh with colored by cylinder ID
rgl::open3d()
rgl::shade3d(qsm$mesh,col=rep(qsm$qsm$cyl_ID,each=20),meshColor = "faces",add=T)
# woodu structure features
qsm$DHB
qsm$Volume
qsm$Length
qsm$Diameter_class
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.