tree_raster | R Documentation |
This function provides individual tree-based variables including number of trees (ntrees), height of trees (ht), number of points per tree (npts), and crown area (ca). These variables are summarized within each pixel including the mean, median, variance, standard deviation, coefficient of variation, IQR, skewness, and kurtosis
tree_raster(las, rast_res)
las |
las object with tree ID column |
rast_res |
desired spatial resolution of raster |
LASfile <- system.file("extdata", "Megaplot.laz", package="lidR")
las <- readLAS(LASfile)
las <- filter_poi(las, Classification != LASNOISE)
las <- normalize_height(las, knnidw(k = 8, p = 2))
las <- filter_poi(las, Z < 50 & Z >= 1.37 )
las <- decimate_points(las, random_per_voxel(res = 1, n = 8))
las_tree <- segment_trees(las, li2012())
tree_metrics <- tree_raster(las_tree, rast_res = 20)
plot(tree_metrics)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.