
Summary basic structural metrics tree point cloud for one tree.
Source:R/summary_metrics.R
summary_basic_pointcloud_metrics_pertree.RdReturns a summary data.frame containing the tree position (X,Y-coordinates), tree height, diameter at breast height, functional diameter at breast height, diameter above buttresses, functional diameter above buttresses, projected (crown) area and (crown) volume of one tree.
Usage
summary_basic_pointcloud_metrics_pertree(
PC_path,
metrics = c("tree position", "stem diameter", "tree height", "projected area",
"alpha volume"),
dtm = NA,
r = 5,
crown = FALSE,
thresholdbranch = 1.5,
minheight = 1,
concavity = 2,
alpha = 1,
buttress = FALSE,
h_cutoff = 20,
thresholdR2 = 0.001,
slice_thickness = 0.06,
thresholdbuttress = 0.001,
maxbuttressheight = 7,
functional = TRUE,
concavity_fdiameter = 4,
how = "median",
arc_min_length_cm = NULL,
arc_min_angle = 18,
arc_tolerance = 0.05,
min_inner_buffer = 0.06,
inner_buffer_fraction = 0.5,
OUT_path = FALSE,
overwrite = FALSE,
plot = FALSE,
plotcolors = c("#000000", "#808080", "#1c027a", "#08aa7c", "#fac87f")
)Arguments
- PC_path
A character with the path to the tree point cloud.
- metrics
A list of strings referring to the metrics you want to calculate. The possibilities are "tree position", "stem diameter", "tree height", "projected area", and "alpha volume".
- dtm
The digital terrain model from
tree_height_pc.- r
Numeric value (default=5) r which determines the range taken for the dtm from
tree_height_pc. Only relevant if a dtm is provided.- crown
Logical (default=FALSE), indicates if the area and volume is calculated based on the full point clouds (crown = FALSE) or only on the crown point clouds (crown = TRUE).
- thresholdbranch
Numeric value (default=1.5) from
classify_crown_pc. Only relevant when crown == TRUE.- minheight
Numeric value (default=1) from
classify_crown_pc. The default value is based on non-buttressed trees. Choose a higher value (e.g. 4) for buttressed trees. Only relevant when crown == TRUE.- concavity
Numeric value (default=2). Parameter of the
projected_area_pcfunction used to calculate the projected crown area.- alpha
Numeric value (default=1). Parameter of the
alpha_volume_pcfunction used to calculate the crown volume.- buttress
Logical (default=FALSE), indicates if the trees have buttresses (higher than breast height).
- h_cutoff
Numeric value (default=15), height threshold where dab is measured when buttress == TRUE.
- thresholdR2
Numeric value (default=0.001). Parameter of the
dbh_pcfunction used to calculate the diameter at breast height. Only relevant if buttress == FALSE.- slice_thickness
Numeric value (default = 0.06). Parameter of the
dbh_pcanddab_pcfunctions used to calculate the diameter at breast height and above buttresses.- thresholdbuttress
Numeric value (default=0.001). Parameter of the
dab_pcfunction used to calculate the diameter above buttresses. Only relevant when buttress == TRUE.- maxbuttressheight
Numeric value (default=7). Parameter of the
dab_pcfunction used to calculate the diameter above buttresses. Only relevant when buttress == TRUE.- functional
Logical (default=FALSE), indicates if the functional diameter should be calculated.
- concavity_fdiameter
Numeric value (default=4) concavity for the computation of the functional diameter using a concave hull based on
concaveman. This concavity value is used in the functionsdiameter_slice_pc,dbh_pc,dab_pc, andclassify_crown_pc.- how
Method used to summarise point-to-centre radii when estimating DBH with
dbh_pc. Use"mean"for the original ITSMe behaviour,"median"for the median radius, or a numeric value such as10to trim 5 percent of radii on each side before taking the mean. Only relevant when buttress == FALSE.- arc_min_length_cm
Optional numeric. Minimum arc length, in centimetres, represented by one angular sector when calculating arc coverage with
dbh_pc. If supplied, this is converted to degrees based on the fitted radius. Only relevant when buttress == FALSE.- arc_min_angle
Numeric. Minimum angular sector width in degrees used to calculate arc coverage with
dbh_pc. Default is 18, corresponding to 20 sectors. Only relevant when buttress == FALSE.- arc_tolerance
Numeric. Radial tolerance, in metres, around the fitted DBH circle. Points within radius +/- arc_tolerance are counted as supporting the fitted circle when calculating arc coverage with
dbh_pc. Only relevant when buttress == FALSE.- min_inner_buffer
Numeric. Minimum buffer distance, in metres, excluded from the fitted DBH radius before checking whether the inner circle is empty with
dbh_pc. Only relevant when buttress == FALSE.- inner_buffer_fraction
Numeric. Fraction of the fitted DBH radius used as buffer before checking whether the inner circle is empty with
dbh_pc. The effective buffer ismax(min_inner_buffer, inner_buffer_fraction * radius). Only relevant when buttress == FALSE.- OUT_path
A character with name of the output folder where the summary figures should be saved or logical (default=FALSE) in this case no figures are saved.
- overwrite
Logical (default=FALSE), indicates if the output file can be overwritten.
- plot
Logical (default=FALSE), indicates if summary figure for each tree point cloud is plotted. If an OUT_path is provided, the figures are saved in the OUT_path.
- plotcolors
list of five colors for plotting. Only relevant when plot = TRUE. The stem points above buttresses, stem points at breast height, fitted circle, the concave hull and the estimated center are colored by the first, second, third, fourth and fifth element of this list respectively.
Value
The summary of the basic structural metrics for multiple tree point clouds as a data.frame. Includes the tree height, diameter at breast height, diameter above buttresses, projected (crown) area and (crown) volume. The summary is saved in a csv file if an output folder is provided.
Details
The tree position, tree height, diameter at breast height, functional
diameter at breast height, diameter above buttresses, functional diameter
above buttresses, projected (crown) area and (crown) volume are otained with
tree_position_pc, tree_height_pc,
dbh_pc, dab_pc, projected_area_pc
and alpha_volume_pc respectively.
Examples
if (FALSE) { # \dontrun{
# Calculate the summary with default parameters and export summary figure
summary <- summary_basic_pointcloud_metrics(
PC_path = "path/to/folder/PCs/",
OUT_path = "path/to/out/folder/"
)
# Calculate the summary with non-default parameter values
# recommended for buttressed trees
summary <- summary_basic_pointcloud_metrics(
PC_path = "path/to/folder/PCs/",
metrics = c("tree position", "stem diameter"),
crown = TRUE, minheight = 4, buttress = TRUE
)
} # }