qsm_volume_distribution: Volume distribution from QSM

View source: R/traits_from_qsm.R

qsm_volume_distributionR Documentation

Volume distribution from QSM

Description

This function estimates tree volume and its vertical distribution from a QSM. The function separates the QSM into (1) trunk sections (2) terminus (top of trunk < 4 cm dbh), and (3) primary branches. The function divides trunk into segments defined by 'segment_size', calculates QSM volume, For tree portions identified as branches the function only returns the diameter. Both of these can be used in mass-volume equations as needed.

Usage

qsm_volume_distribution(qsm, terminus_diam_cm = 4, segment_size = 0.5)

Arguments

qsm

a QSM loaded using '[load_qsm()]'.

terminus_diam_cm

numeric - trunk diameter at which it is treated as a branch.

segment_size

numeric length of trunk segments in which to summarize volume.

Value

A tibble describing vertical volume distribution with columns:

section

Tree component ("trunk", "terminus", or "branches").

diam_cm

Diameter (cm) of the segment or branch.

ht_m

Height (m) of the segment midpoint or branch attachment.

volume

Total volume (m^3) of the segment (trunk and terminus only; 'NA' for branches).

Examples

qsm_file = system.file("extdata", "tree_0744_qsm.txt", package='tReeTraits')
qsm = load_qsm(qsm_file)
volume = qsm_volume_distribution(qsm)
print(volume)
plot(volume~ht_m, data=volume, type='l', xlab='height (m)', ylab='Volume (m3)')

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