View source: R/summary_metrics.R
summary_basic_pointcloud_metrics | R Documentation |
Returns a summary data.frame containing the tree position (X,Y-coordinates), tree height, diameter at breast height, functional diameter at breast height, diameter above buttresses, functional diameter above buttresses, projected (crown) area and (crown) volume.
summary_basic_pointcloud_metrics(
PCs_path,
extension = ".txt",
dtm = NA,
r = 5,
crown = FALSE,
thresholdbranch = 1.5,
minheight = 1,
concavity = 2,
alpha = 1,
buttress = FALSE,
thresholdR2 = 0.001,
slice_thickness = 0.06,
thresholdbuttress = 0.001,
maxbuttressheight = 7,
functional = TRUE,
concavity_fdiameter = 4,
OUT_path = FALSE,
plot = FALSE,
plotcolors = c("#000000", "#808080", "#1c027a", "#08aa7c", "#fac87f")
)
PCs_path |
A character with the path to the folder that contains the tree point clouds. |
extension |
A character refering to the file extension of the point cloud files (default=".txt"). Can be ".txt", ".ply" or ".las". Only relevant if the tree point clouds are available. |
dtm |
The digital terrain model from |
r |
Numeric value (default=5) r which determines the range taken for the
dtm from |
crown |
Logical (default=FALSE), indicates if the area and volume is calculated based on the full point clouds (crown = FALSE) or only on the crown point clouds (crown = TRUE). |
thresholdbranch |
Numeric value (default=1.5) from
|
minheight |
Numeric value (default=1) from
|
concavity |
Numeric value (default=2). Parameter of the
|
alpha |
Numeric value (default=1). Parameter of the
|
buttress |
Logical (default=FALSE), indicates if the trees have buttresses (higher than breast height). |
thresholdR2 |
Numeric value (default=0.001). Parameter of the
|
slice_thickness |
Numeric value (default = 0.06). Parameter of the
|
thresholdbuttress |
Numeric value (default=0.001). Parameter of the
|
maxbuttressheight |
Numeric value (default=7). Parameter of the
|
functional |
Logical (default=FALSE), indicates if the functional diameter should be calculated. |
concavity_fdiameter |
Numeric value (default=4) concavity for the
computation of the functional diameter using a concave hull based on
|
OUT_path |
A character with name of the output file (including the path to the folder), where the summary csv file should be saved or logical (default=FALSE) in this case no csv file is produced. |
plot |
Logical (default=FALSE), indicates if summary figure for each tree point cloud is plotted. If an OUT_path is provided, the figures are saved in the OUT_path. |
plotcolors |
list of five colors for plotting. Only relevant when plot = TRUE. The stem points above buttresses, stem points at breast height, fitted circle, the concave hull and the estimated center are colored by the first, second, third, fourth and fifth element of this list respectively. |
The tree position, tree height, diameter at breast height, functional
diameter at breast height, diameter above buttresses, functional diameter
above buttresses, projected (crown) area and (crown) volume are otained with
tree_position_pc
, tree_height_pc
,
dbh_pc
, dab_pc
, projected_area_pc
and alpha_volume_pc
respectively.
The summary of the basic structural metrics for multiple tree point clouds as a data.frame. Includes the tree height, diameter at breast height, diameter above buttresses, projected (crown) area and (crown) volume. The summary is saved in a csv file if an output folder is provided.
## Not run:
# Calculate the summary with default parameters and export to csv
summary <- summary_basic_pointcloud_metrics(
PCs_path = "path/to/folder/PCs/",
OUT_path = "path/to/out/folder/"
)
# Calculate the summary with non-default parameter values
# recommended for buttressed trees
summary <- summary_basic_pointcloud_metrics(
PCs_path = "path/to/folder/PCs/",
extension = ".ply", crown = TRUE,
minheight = 4, buttress = TRUE
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.