Titanlib
Library for quality control algorithms
Public Member Functions | List of all members
titanlib::KDTree Class Reference

#include <titanlib.h>

Public Member Functions

int get_nearest_neighbour (float lat, float lon, bool include_match)
 Find single nearest points. More...
 
ivec get_nearest_neighbour (const vec &lats, const vec &lons, bool include_match)
 
ivec get_neighbours (float lat, float lon, float radius, int num_max, bool include_match)
 Find all points with a radius. More...
 
ivec get_neighbours_with_distance (float lat, float lon, float radius, int num_max, bool include_match, vec &distances)
 Find all points with a radius. More...
 
int get_num_neighbours (float lat, float lon, float radius, int num_max, bool include_match)
 Find the number of points within a radius. More...
 
 KDTree (const vec &lats, const vec &lons)
 

Constructor & Destructor Documentation

◆ KDTree()

titanlib::KDTree::KDTree ( const vec lats,
const vec lons 
)

Member Function Documentation

◆ get_nearest_neighbour() [1/2]

int titanlib::KDTree::get_nearest_neighbour ( float  lat,
float  lon,
bool  include_match 
)

Find single nearest points.

Parameters
latLatitude of lookup-point
lonLongitude of lookup-point

◆ get_nearest_neighbour() [2/2]

ivec titanlib::KDTree::get_nearest_neighbour ( const vec lats,
const vec lons,
bool  include_match 
)

◆ get_neighbours()

ivec titanlib::KDTree::get_neighbours ( float  lat,
float  lon,
float  radius,
int  num_max,
bool  include_match 
)

Find all points with a radius.

Parameters
latLatitude of lookup-point
lonLongitude of lookup-point
radiusLookup radius (use 0 for unlimited) [m]
num_maxMaximum number of points (use 0 for unlimited)
include_matchShould an exact match be included?

◆ get_neighbours_with_distance()

ivec titanlib::KDTree::get_neighbours_with_distance ( float  lat,
float  lon,
float  radius,
int  num_max,
bool  include_match,
vec distances 
)

Find all points with a radius.

Parameters
latLatitude of lookup-point
lonLongitude of lookup-point
radiusLookup radius [m]
distancesVector to store separation distances [m]

◆ get_num_neighbours()

int titanlib::KDTree::get_num_neighbours ( float  lat,
float  lon,
float  radius,
int  num_max,
bool  include_match 
)

Find the number of points within a radius.

Parameters
latLatitude of lookup-point
lonLongitude of lookup-point
radiusLookup radius [m]

The documentation for this class was generated from the following files: