Generates summaries of QSM features (e.g. volume, surface area, dbh, etc.) by totals and branch order
Examples
## TreeQSM Processing Chain
file <- system.file("extdata/QSM.mat", package = "rTwig")
qsm <- import_qsm(file)
#> Importing TreeQSM .mat
cylinder <- qsm$cylinder
cylinder <- update_cylinders(cylinder)
#> Updating Cylinder Ordering
#> Calculating Total Children
#> Building Cylinder Network
#> Verifying Topology
#> Calculating Growth Length
#> Calculating Reverse Branch Order
#> Calculating Branch Segments
#> Calculating Alternate Branch Numbers
#> Calculating Distance From Base
#> Calculating Average Distance To Twigs
qsm_summary(cylinder)
#> Creating QSM Summary
#> [[1]]
#> # A tidytable: 6 × 3
#> BranchOrder tree_volume_L tree_area_m2
#> <int> <dbl> <dbl>
#> 1 0 10.8 0.644
#> 2 1 5.80 0.827
#> 3 2 3.86 0.732
#> 4 3 1.06 0.237
#> 5 4 0.622 0.0785
#> 6 5 0.0346 0.00693
#>
#> [[2]]
#> # A tidytable: 1 × 8
#> dbh_qsm_cm tree_height_m stem_volume_L branch_volume_L tree_volume_L
#> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 7.18 3.69 10.8 11.4 22.2
#> # ℹ 3 more variables: stem_area_m2 <dbl>, branch_area_m2 <dbl>,
#> # tree_area_m2 <dbl>
#>
# TreeQSM Triangulation
file <- system.file("extdata/QSM.mat", package = "rTwig")
qsm <- import_qsm(file)
#> Importing TreeQSM .mat
cylinder <- qsm$cylinder
cylinder <- update_cylinders(cylinder)
#> Updating Cylinder Ordering
#> Calculating Total Children
#> Building Cylinder Network
#> Verifying Topology
#> Calculating Growth Length
#> Calculating Reverse Branch Order
#> Calculating Branch Segments
#> Calculating Alternate Branch Numbers
#> Calculating Distance From Base
#> Calculating Average Distance To Twigs
triangulation <- qsm$triangulation
qsm_summary(cylinder = cylinder, triangulation = triangulation)
#> Creating QSM Summary
#> [[1]]
#> # A tidytable: 6 × 3
#> BranchOrder tree_volume_L tree_area_m2
#> <int> <dbl> <dbl>
#> 1 0 29.0 0.645
#> 2 1 5.80 0.827
#> 3 2 3.86 0.732
#> 4 3 1.06 0.237
#> 5 4 0.622 0.0785
#> 6 5 0.0346 0.00693
#>
#> [[2]]
#> # A tidytable: 1 × 8
#> dbh_qsm_cm tree_height_m stem_volume_L branch_volume_L tree_volume_L
#> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 7.18 3.69 29.0 11.4 40.4
#> # ℹ 3 more variables: stem_area_m2 <dbl>, branch_area_m2 <dbl>,
#> # tree_area_m2 <dbl>
#>
## SimpleForest Processing Chain
file <- system.file("extdata/QSM.csv", package = "rTwig")
cylinder <- read.csv(file)
cylinder <- update_cylinders(cylinder)
#> Updating Branch Ordering
#> Calculating Total Children
#> Building Cylinder Network
#> Verifying Topology
#> Calculating Distance From Base
#> Calculating Average Distance To Twigs
qsm_summary(cylinder)
#> Creating QSM Summary
#> [[1]]
#> # A tidytable: 5 × 3
#> BranchOrder tree_volume_L tree_area_m2
#> <int> <dbl> <dbl>
#> 1 0 12.9 0.768
#> 2 1 8.70 1.07
#> 3 2 6.46 0.871
#> 4 3 1.82 0.298
#> 5 4 0.0723 0.0148
#>
#> [[2]]
#> # A tidytable: 1 × 8
#> dbh_qsm_cm tree_height_m stem_volume_L branch_volume_L tree_volume_L
#> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 7.39 3.67 12.9 17.1 30.0
#> # ℹ 3 more variables: stem_area_m2 <dbl>, branch_area_m2 <dbl>,
#> # tree_area_m2 <dbl>
#>