View source: R/group_geometric_features.R
group_geom_features | R Documentation |
Compute geometric features for a group on points
group_geom_features(las, group, feat_list)
las |
a LAS file. |
group |
character. The name of the grouping variable. |
feat_list |
(optional) character. A vector containing the list of the geometric features to compute. Can be: "Eigenvalue_sum","Omnivariance", "Eigenentropy","Anisotropy","Planarity", "Linearity","PCA1","PCA2","Surface_variation","Sphericity","Curvature". |
the LAS with the geometric features.
# import data
file = system.file("extdata", "tree_no_leaves.las", package="lidUrb")
las = lidR::readLAS(file)
# cluster using DBSCAN to create a group
las@data[,cluster := dbscan::dbscan(las@data[,1:3],0.03,1)$cluster]
# compute Planarity and Linearity for each cluster
las = lidUrb::group_geom_features(las,group = "cluster",feat_list = c("Planarity","Linearity"))
# plot the result
lidR::plot(las,color="Linearity_G")
lidR::plot(las,color="Planarity_G")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.