clouds_tree_metrics {lidaRtRee}R Documentation

Computes metrics on trees detected in list of point clouds.

Description

Extracts summary statistics on trees for each LAS object in a list:

Usage

clouds_tree_metrics(llasn, XY, plot_radius, res = 0.5, func, ...)

Arguments

llasn

list of LAS objects

XY

a data frame or matrix with XY coordinates of plot centers

plot_radius

numeric. plot radius in meters

res

numeric. resolution of canopy height model computed with points2DSM before tree segmentation

func

a function to be applied to the attributes of extracted trees (return from internal call to tree_extraction function) to compute plot level metrics

...

other parameters to be passed to tree_segmentation

Details

Value

a data frame with tree metrics in columns corresponding to LAS objects of the list (lines)

See Also

tree_segmentation, tree_extraction, std_tree_metrics

Examples

# load LAS file
LASfile <- system.file("extdata", "las_chablais3.laz", package="lidaRtRee")
las_chablais3 <- lidR::readLAS(LASfile)

# extract two point clouds from LAS object
llas <- lidR::clip_circle(las_chablais3,
                          c(974350, 974390),
                          c(6581680, 6581680), 10)
# normalize point clouds
llas <- lapply(llas, function(x) {
  lidR::normalize_height(x, lidR::tin())
})

# compute metrics with user-defined function
# number of detected trees between 20 and 30 meters and their mean height
# restricted to disks of radius 8 m.
user_func <- function(x) {
  dummy <- x$h[which(x$h > 20 & x$h < 30)]
  data.frame(Tree.between.20.30 = length(dummy), Tree.meanH = mean(dummy))
}
clouds_tree_metrics(llas,
  cbind(c(974350, 974390), c(6581680, 6581680)),
  8,
  res = 0.5, func = user_func
)

[Package lidaRtRee version 4.0.5 Index]