basics_diagnostic_plot: Diagnostic Plot of Basic Tree Measurements

View source: R/diagnostics.R

basics_diagnostic_plotR Documentation

Diagnostic Plot of Basic Tree Measurements

Description

Generates a diagnostic 2D plot showing basic tree measurements such as tree height, crown base height (CBH), crown width, and diameter at breast height (DBH) over a subsampled LAS point cloud.

Usage

basics_diagnostic_plot(las, height, cbh, crown_width, dbh, res = 0.1)

Arguments

las

A 'LAS' object (from the 'lidR' package) containing the tree point cloud.

height

Numeric. Total tree height.

cbh

Numeric. Crown base height.

crown_width

Numeric. Crown width.

dbh

Numeric. Diameter at breast height.

res

Numeric. Resolution for point cloud thinning; default is 0.1 m.

Details

The function first thins the point cloud using 'lidR::decimate_points()' to improve plotting speed. Then it overlays key measurement lines and markers for height, crown width, DBH, and crown base height.

Value

A 'ggplot' object displaying thinned tree points and markers for key measurements.

Examples

library(lidR)
path = system.file('extdata', 'tree_0744.laz', package='tReeTraits')
las = clean_las(readLAS(path))
ht = get_height(las)
dbh = get_dbh(las)
wid = get_width(las)[1]
cbh = get_crown_base(las)
basics_diagnostic_plot(las, height = ht, cbh = cbh,
                     crown_width = wid, dbh = dbh)

tReeTraits documentation built on Feb. 26, 2026, 1:07 a.m.