Learn R Programming

TreeLS (version 2.0.2)

nnFilter: Nearest neighborhood point filter

Description

Remove isolated points from a LAS point cloud based on their neighborhood distances.

Usage

nnFilter(las, d = 0.05, n = 2)

Arguments

las

LAS object.

d

numeric - search radius.

n

numeric - number of neighbors within d distance a point must have to be kept in the output.

Value

LAS object.

Examples

Run this code
# NOT RUN {
file = system.file("extdata", "spruce.laz", package="TreeLS")
tls = readTLS(file)
nrow(tls@data)

nn_tls = nnFilter(tls, 0.05, 3)
nrow(nn_tls@data)
# }

Run the code above in your browser using DataLab