Learn R Programming

lidR (version 4.2.1)

knn: Search Nearest Neighbors

Description

Fast parallelized k-neareast neighbor searching algorithms for point cloud in LAS format

Usage

knn(data, k = 10)

knnx(data, query, k = 10)

Value

a list contains:

  1. **nn.index** an n x k matrix for the nearest neighbor indice.

  2. **nn.dist** an n x k matrix for the nearest neighbor Euclidean distances.

Arguments

data

LAS object for input point cloud

k

number of nearest neighbors to search.

query

LAS object for query locations