group_geom_features: Compute geometric features for a group on points

View source: R/group_geometric_features.R

group_geom_featuresR Documentation

Compute geometric features for a group on points

Description

Compute geometric features for a group on points

Usage

group_geom_features(las, group, feat_list)

Arguments

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".

Value

the LAS with the geometric features.

Examples


# 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")


Blecigne/lidUrb documentation built on Feb. 19, 2024, 9:12 a.m.