View source: R/traits_from_point_cloud.R
| add_verticality | R Documentation |
Computes a verticality metric (0-1) for each point in a LAS object based on the z-component of the dominant local PCA eigenvector.
add_verticality(las, k = 30, name = "verticality")
las |
A |
k |
Number of nearest neighbors for local PCA. |
name |
Name of the attribute to store. |
The input 'LAS' object with a new numeric attribute containing verticality values (0–1).
las = lidR::readLAS(system.file("extdata", "tree_0744.laz", package="tReeTraits"))
las = add_verticality(las, k = 20)
head(las@data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.