
Last chance! 50% off unlimited learning
Sale ends in
Computes the eigenvalues of the covariance matrix of the neighbouring points using several possible algorithms. The points that meet a given criterion based on the eigenvalue are labeled as approximately coplanar/colinear or any other shape supported.
segment_shapes(las, algorithm, attribute = "Shape", filter = NULL)
an object of class LAS
An algorithm for shape detection. lidR has: shp_plane, shp_hplane and shp_line.
character. The name of the new column to add into the LAS object.
formula of logical predicates. Enables the function to run only on points of interest in an optimized way. See also examples.
A LAS object with a new column named after the argument attribute
that indicates
those points that are part of a neighborhood that is approximately of the shape searched (TRUE)
or not (FALSE).
# NOT RUN {
LASfile <- system.file("extdata", "Megaplot.laz", package="lidR")
las <- readLAS(LASfile)
las <- segment_shapes(las, shp_plane(k = 15), "Coplanar")
#plot(las, color = "Coplanar")
# Drop ground point at runtime
las <- segment_shapes(las, shp_plane(k = 15), "Coplanar", filter = ~Classification != 2L)
#plot(las, color = "Coplanar")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab