fastPointMetrics: Calculate point neighborhood metrics

Description Usage Arguments Details Value List of available point metrics References Examples

View source: R/point_metrics_methods.R

Description

Get statistics for every point in a LAS object. Neighborhood search methods are prefixed by ptm.

Usage

1
2
3
4
5
fastPointMetrics(
  las,
  method = ptm.voxel(),
  which_metrics = ENABLED_POINT_METRICS$names
)

Arguments

las

LAS object.

method

neighborhood search algorithm. Currently available: ptm.voxel and ptm.knn.

which_metrics

optional character vector - list of metrics (by name) to be calculated. Check out fastPointMetrics.available for a list of all metrics.

Details

Individual or voxel-wise point metrics build up the basis for many studies involving TLS in forestry. This function is used internally in other TreeLS methods for tree mapping and stem denoising, but also may be useful to users interested in developing their own custom methods for point cloud classification/filtering of vegetation features or build up input datasets for machine learning classifiers.

fastPointMetrics provides a way to calculate several geometry related metrics (listed below) in an optimized way. All metrics are calculated internally by C++ functions in a single pass (O(n) time), hence fast. This function is provided for convenience, as it allows very fast calculations of several complex variables on a single line of code, speeding up heavy work loads. For a more flexible approach that allows user defined metrics check out point_metrics from the lidR package.

In order to avoid excessive memory use, not all available metrics are calculated by default. The calculated metrics can be specified every time fastPointMetrics is run by naming the desired metrics into the which_metrics argument, or changed globally for the active R session by setting new default metrics using fastPointMetrics.available.

Value

LAS object.

List of available point metrics

\loadmathjax

* EVi = i-th 3D eigen value

* EV2Di = i-th 2D eigen value

References

Wang, D.; Hollaus, M.; Pfeifer, N., 2017. Feasibility of machine learning methods for separating wood and leaf points from terrestrial laser scanning data. ISPRS Annals of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume IV-2/W4.

Zhou, J. et. al., 2019. Separating leaf and wood points in terrestrial scanning data using multiple optimal scales. Sensors, 19(8):1852.

Examples

1
2
3
4
5
6
7
8
9
file = system.file("extdata", "pine.laz", package="TreeLS")
tls = readTLS(file, select='xyz')

all_metrics = fastPointMetrics.available()
my_metrics = all_metrics[c(1,4,6)]

tls = fastPointMetrics(tls, ptm.knn(10), my_metrics)
head(tls@data)
plot(tls, color='Linearity')

TreeLS documentation built on Aug. 26, 2020, 5:14 p.m.