Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

segment_shapes

Estimation of the shape of the points neighborhood


Description

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.

Usage

segment_shapes(las, algorithm, attribute = "Shape", filter = NULL)

Arguments

las

an object of class LAS

algorithm

An algorithm for shape detection. lidR has: shp_plane, shp_hplane and shp_line.

attribute

character. The name of the new column to add into the LAS object.

filter

formula of logical predicates. Enables the function to run only on points of interest in an optimized way. See also examples.

Value

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

Examples

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

## End(Not run)

lidR

Airborne LiDAR Data Manipulation and Visualization for Forestry Applications

v3.1.2
GPL-3
Authors
Jean-Romain Roussel [aut, cre, cph], David Auty [aut, ctb] (Reviews the documentation), Florian De Boissieu [ctb] (Fixed bugs and improved catalog features), Andrew Sánchez Meador [ctb] (Implemented wing2015() for segment_snags()), Bourdon Jean-François [ctb] (Contributed to Roussel2020() for track_sensor()), Gatziolis Demetrios [ctb] (Implemented Gatziolis2019() for track_sensor())
Initial release
2021-03-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.