Learn R Programming

rTLS (version 0.2.3)

radius_search: Radius Search of Points

Description

Radius searching of points based on FLANN C++

Usage

radius_search(
  query,
  ref,
  radius,
  max_neighbour,
  same = FALSE,
  build = "kdtree",
  threads = 1L,
  checks = 1L
)

Arguments

query

A data.table containing the set of query points where each row represent a point and each column a given coordinate.

ref

A numeric containing the set of reference points where each row represent a point and each column a given coordinate.

radius

A numeric describing the euclidean distance form the each query points.

max_neighbour

An integer specifying the maximun number of points to look around each query point for a given radius.

same

Logic. If TRUE, it delete neighbors with distance of 0, useful when the k search is based on the same query.

build

A character describing the search structure to be used: "kdtree", "kmeans", "linear".

threads

An integer specifying the number of threads to use for parallel processing. Experiment to see what works best for your data on your hardware. If 0, then the maximum allowable cores are used.

checks

Number of checks during searching. Higher value gives better search precision but takes longer. See FLANN C++ manual for more details.

Value

A data.table with three columns describing the indices of the query and ref points and the distances.

Details

This function is based on the FLAAN C++ Library (Muja and Lowe 2009) for a fast estimation of neighbors points. It is adapted from rflann (Muja, Lowe, Yee, 2018) to simplify the workflow with TLS data. If you use this function, please consider cite both documents.

References

Muja, M., Lowe, D.G. (2009). Fast approximate nearest neighbors with automatic algorithm configuration. VISAPP (1), 2(331-340), 2.

Muja, M., Lowe, D.G., Yee, J., (2018). rflann: Basic R Interface to the 'FLANN' C++ Library. R package version 1.6.0.

See Also

radius_search

Examples

Run this code
# NOT RUN {
#Point cloud
data("pc_tree")

#Radius search of 0.1
radius_search(pc_tree, pc_tree, radius = 0.1, 100, TRUE, "kdtree")

# }

Run the code above in your browser using DataLab