Estimate the tree height, crown area, and the diameter at breast height of a tree point cloud
tree_metrics(cloud, region.diameter = NULL, relocateZ = TRUE)
A data.table
of the target point with three columns of the *XYZ* coordinates.
A numeric
vector of length 2 indicating the lower and higher region to subset the point cloud and get the diameter. If region.diameter = NULL
, it use c(1.25, 1.35)
. NULL
as default.
Logical, if TRUE
it relocates the *Z* coordinates to a minimum coordinate of zero based on the current min(cloud[,3])
. Useful if the base value (*Z*) of a tree point cloud is not topography corrected.
A data.table
with the tree height, crown area, and diameter
The tree height is estimated based on the maximum value of *Z*, the
crown area is calculated applying a convex hull on the point cloud, while the
DBH is calculated extracting the area of the convex hull on the subset of points
between region.diameter
, and then estimating the diameter of a circle.
For another estimation of DBH try circleRANSAC
or for irregular
trucks try trunk_volume
.
data("pc_tree")
tree_metrics(pc_tree)
#> Height Crown_area DBH
#> 1: 6.0365 28.54889 0.2002415