| basics_diagnostic_plot | R Documentation |
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.
basics_diagnostic_plot(las, height, cbh, crown_width, dbh, res = 0.1)
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. |
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.
A 'ggplot' object displaying thinned tree points and markers for key measurements.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.