#include <gridpp.h>
|
ivec | get_closest_neighbours (float lat, float lon, int num, bool include_match=true) const |
| Find a set of nearest points. More...
|
|
CoordinateType | get_coordinate_type () const |
|
vec | get_lats () const |
|
vec | get_lons () const |
|
int | get_nearest_neighbour (float lat, float lon, bool include_match=true) const |
| Find single nearest points. More...
|
|
ivec | get_neighbours (float lat, float lon, float radius, bool include_match=true) const |
| Find all points with a radius. More...
|
|
ivec | get_neighbours_with_distance (float lat, float lon, float radius, vec &distances, bool include_match=true) const |
| Find all points with a radius. More...
|
|
int | get_num_neighbours (float lat, float lon, float radius, bool include_match=true) const |
| Find the number of points within a radius. More...
|
|
const vec & | get_x () const |
|
const vec & | get_y () const |
|
const vec & | get_z () const |
|
| KDTree (vec lats, vec lons, CoordinateType type=Geodetic) |
|
| KDTree (const KDTree &other) |
|
| KDTree (CoordinateType type=Geodetic) |
|
KDTree & | operator= (KDTree other) |
|
int | size () const |
|
|
static float | calc_distance (float lat1, float lon1, float lat2, float lon2, CoordinateType type=Geodetic) |
| Calculate distance between two coordinates using Haversine function. More...
|
|
static float | calc_distance (const Point &p1, const Point &p2) |
| Calculate distance between two points using Haversine function. More...
|
|
static float | calc_distance_fast (float lat1, float lon1, float lat2, float lon2, CoordinateType type=Geodetic) |
| Calculate an approximate distance between two coordinates. More...
|
|
static float | calc_straight_distance (float x0, float y0, float z0, float x1, float y1, float z1) |
| Calculate straight line distance between two 3D coordinates. More...
|
|
static float | calc_straight_distance (const Point &p1, const Point &p2) |
| Calculate straight line distance between two points. More...
|
|
static float | deg2rad (float deg) |
|
static float | rad2deg (float deg) |
|
|
typedef boost::geometry::model::box< point > | box |
|
typedef boost::geometry::model::point< float, 3, boost::geometry::cs::cartesian > | point |
|
typedef std::pair< point, unsigned > | value |
|
Helper class for Grid and Points representing a tree of points.
◆ box
◆ point
◆ value
◆ KDTree() [1/3]
◆ KDTree() [2/3]
gridpp::KDTree::KDTree |
( |
const KDTree & |
other | ) |
|
◆ KDTree() [3/3]
◆ calc_distance() [1/2]
float gridpp::KDTree::calc_distance |
( |
float |
lat1, |
|
|
float |
lon1, |
|
|
float |
lat2, |
|
|
float |
lon2, |
|
|
CoordinateType |
type = Geodetic |
|
) |
| |
|
static |
Calculate distance between two coordinates using Haversine function.
- Parameters
-
lat1 | Latitude [deg] or y-coordinate [m] for first point |
lon1 | Longitude [deg] or x-coordinate [m] for first point |
lat2 | Latitude [deg] or y-coordinate [m] for second point |
lon2 | Longitude [deg] or x-coordinate [m] for second point |
type | Coordinate type for both points |
- Returns
- Distance [m]
◆ calc_distance() [2/2]
float gridpp::KDTree::calc_distance |
( |
const Point & |
p1, |
|
|
const Point & |
p2 |
|
) |
| |
|
static |
Calculate distance between two points using Haversine function.
- Parameters
-
p1 | First point |
p2 | Second point |
- Returns
- Distance [m]
◆ calc_distance_fast()
float gridpp::KDTree::calc_distance_fast |
( |
float |
lat1, |
|
|
float |
lon1, |
|
|
float |
lat2, |
|
|
float |
lon2, |
|
|
CoordinateType |
type = Geodetic |
|
) |
| |
|
static |
Calculate an approximate distance between two coordinates.
- Parameters
-
lat1 | Latitude [deg] or y-coordinate [m] for first point |
lon1 | Longitude [deg] or x-coordinate [m] for first point |
lat2 | Latitude [deg] or y-coordinate [m] for second point |
lon2 | Longitude [deg] or x-coordinate [m] for second point |
type | Coordinate type for both points |
- Returns
- Distance [m]
◆ calc_straight_distance() [1/2]
float gridpp::KDTree::calc_straight_distance |
( |
float |
x0, |
|
|
float |
y0, |
|
|
float |
z0, |
|
|
float |
x1, |
|
|
float |
y1, |
|
|
float |
z1 |
|
) |
| |
|
static |
Calculate straight line distance between two 3D coordinates.
This is much faster than calc_distance.
- Parameters
-
x0 | x-coordinate of first point [m] |
y0 | y-coordinate of first point [m] |
z0 | z-coordinate of first point [m] |
x1 | x-coordinate of second point [m] |
y1 | y-coordinate of second point [m] |
z1 | z-coordinate of second point [m] |
- Returns
- Distance [m]
◆ calc_straight_distance() [2/2]
float gridpp::KDTree::calc_straight_distance |
( |
const Point & |
p1, |
|
|
const Point & |
p2 |
|
) |
| |
|
static |
Calculate straight line distance between two points.
This is much faster than calc_distance.
- Parameters
-
p1 | First point |
p2 | Second point |
- Returns
- Distance [m]
◆ deg2rad()
float gridpp::KDTree::deg2rad |
( |
float |
deg | ) |
|
|
static |
◆ get_closest_neighbours()
ivec gridpp::KDTree::get_closest_neighbours |
( |
float |
lat, |
|
|
float |
lon, |
|
|
int |
num, |
|
|
bool |
include_match = true |
|
) |
| const |
Find a set of nearest points.
- Parameters
-
lat | Latitude of lookup-point |
lon | Longitude of lookup-point |
num | Number of points to find |
◆ get_coordinate_type()
◆ get_lats()
vec gridpp::KDTree::get_lats |
( |
| ) |
const |
◆ get_lons()
vec gridpp::KDTree::get_lons |
( |
| ) |
const |
◆ get_nearest_neighbour()
int gridpp::KDTree::get_nearest_neighbour |
( |
float |
lat, |
|
|
float |
lon, |
|
|
bool |
include_match = true |
|
) |
| const |
Find single nearest points.
- Parameters
-
lat | Latitude of lookup-point |
lon | Longitude of lookup-point |
◆ get_neighbours()
ivec gridpp::KDTree::get_neighbours |
( |
float |
lat, |
|
|
float |
lon, |
|
|
float |
radius, |
|
|
bool |
include_match = true |
|
) |
| const |
Find all points with a radius.
- Parameters
-
lat | Latitude of lookup-point |
lon | Longitude of lookup-point |
radius | Lookup radius [m] |
◆ get_neighbours_with_distance()
ivec gridpp::KDTree::get_neighbours_with_distance |
( |
float |
lat, |
|
|
float |
lon, |
|
|
float |
radius, |
|
|
vec & |
distances, |
|
|
bool |
include_match = true |
|
) |
| const |
Find all points with a radius.
- Parameters
-
lat | Latitude of lookup-point |
lon | Longitude of lookup-point |
radius | Lookup radius [m] |
distances | Vector to store separation distances [m] |
◆ get_num_neighbours()
int gridpp::KDTree::get_num_neighbours |
( |
float |
lat, |
|
|
float |
lon, |
|
|
float |
radius, |
|
|
bool |
include_match = true |
|
) |
| const |
Find the number of points within a radius.
- Parameters
-
lat | Latitude of lookup-point |
lon | Longitude of lookup-point |
radius | Lookup radius [m] |
◆ get_x()
const vec & gridpp::KDTree::get_x |
( |
| ) |
const |
◆ get_y()
const vec & gridpp::KDTree::get_y |
( |
| ) |
const |
◆ get_z()
const vec & gridpp::KDTree::get_z |
( |
| ) |
const |
◆ operator=()
◆ rad2deg()
float gridpp::KDTree::rad2deg |
( |
float |
deg | ) |
|
|
static |
◆ size()
int gridpp::KDTree::size |
( |
| ) |
const |
◆ mLats
vec gridpp::KDTree::mLats |
|
protected |
◆ mLons
vec gridpp::KDTree::mLons |
|
protected |
◆ mTree
boost::geometry::index::rtree< value, boost::geometry::index::quadratic<16> > gridpp::KDTree::mTree |
|
protected |
◆ mType
◆ mX
◆ mY
◆ mZ
The documentation for this class was generated from the following files: