get_width: Extract width from 'LAS' object representing segmented tree.

View source: R/traits_from_point_cloud.R

get_widthR Documentation

Extract width from 'LAS' object representing segmented tree.

Description

Function to extract width from LAS object. Function calculates difference between two specified quantiles from the 'X' and 'Y' attributes and returns both widths and their average.

Usage

get_width(las, quantiles = c(0.001, 0.999))

Arguments

las

'LAS' object from 'lidR' package representing individually segmented tree

quantiles

Z quantiles at which widths are measured are measured. Values in the interval (0,1) are recommended to trim random noise.

Value

A named numeric vector with elements 'mean_width', 'x_width', and 'y_width' (m).

Examples

library(lidR)
las = readLAS(system.file("extdata", "tree_0744.laz", package="tReeTraits"))
las = clean_las(las)
print(get_width(las))

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