View source: R/basic_metrics_pc.R
projected_area_pc | R Documentation |
Returns the projected area measured from a point cloud.
projected_area_pc(
pc,
concavity = 2,
plot = FALSE,
plotcolors = c("#000000", "#08aa7c")
)
pc |
The point cloud as a data.frame with columns X,Y,Z (e.g. output of
|
concavity |
Numeric value (default=2) concavity for the computation of a
concave hull based on |
plot |
Logical (default=FALSE), indicates if the optimised circle fitting is plotted. |
plotcolors |
list of two colors for plotting. Only relevant when plot = TRUE. The stem points and the concave hull are colored by the first and second element of this list respectively. |
This function uses st_area
and
concaveman
to calculate the area of the concave
hull fitted to the provided point clouds.
The projected area (numeric value) as the area of the concave hull computed from the points of point cloud. Also optionally (plot=TRUE) plots the concave hull fitting and in this case returns a list with the area as first element and the plot as the second element.
## Not run:
# Read tree point cloud and calculate the projected tree area
pc_tree <- read_tree_pc(PC_path = "path/to/point_cloud.txt")
pta <- projected_crown_area_pc(pc = pc_tree)
# and plot the concave hull fitting
output <- projected_crown_area_pc(pc = pc_tree, plot = TRUE)
pca <- output$pca
# classify the tree point cloud and calculate the projected crown area
crown_pc <- classify_crown_pc(
pc, thresholdbranch, minheight, buttress,
thresholdR2, thresholdbuttress,
maxbuttressheight, FALSE
)
pca <- projected_crown_area_pc(pc = crown_pc$crownpoints)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.