#include <gridpp.h>
|
bool | convert_coordinates (const vec &lats, const vec &lons, vec &x_coords, vec &y_coords, vec &z_coords) const |
| Convert lat/lons to 3D cartesian coordinates with the centre of the earth as the origin. More...
|
|
bool | convert_coordinates (float lat, float lon, float &x_coord, float &y_coord, float &z_coord) const |
| Same as above, but convert a single lat/lon to 3D cartesian coordinates. More...
|
|
ivec | get_closest_neighbours (float lat, float lon, int num) 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) const |
| Find single nearest points. More...
|
|
ivec | get_neighbours (float lat, float lon, float radius) const |
| Find all points with a radius. More...
|
|
ivec | get_neighbours_with_distance (float lat, float lon, float radius, vec &distances) const |
| Find all points with a radius. More...
|
|
int | get_num_neighbours (float lat, float lon, float radius) const |
| Find the number of points within a radius. More...
|
|
| KDTree (vec lats, vec lons, CoordinateType type=Geodetic) |
|
| KDTree (const KDTree &other) |
|
| KDTree () |
|
KDTree & | operator= (KDTree other) |
|
int | size () const |
|
|
static float | calc_distance (float lat1, float lon1, float lat2, float lon2, CoordinateType type=Geodetic) |
|
static float | calc_distance (float x0, float y0, float z0, float x1, float y1, float z1) |
|
static float | calc_distance_fast (float lat1, float lon1, float lat2, float lon2, CoordinateType type=Geodetic) |
|
static float | calc_distance_fast (const Point &p1, const Point &p2) |
|
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.
◆ box
◆ point
◆ value
◆ KDTree() [1/3]
◆ KDTree() [2/3]
gridpp::KDTree::KDTree |
( |
const KDTree & |
other | ) |
|
◆ KDTree() [3/3]
gridpp::KDTree::KDTree |
( |
| ) |
|
|
inline |
◆ calc_distance() [1/2]
float gridpp::KDTree::calc_distance |
( |
float |
lat1, |
|
|
float |
lon1, |
|
|
float |
lat2, |
|
|
float |
lon2, |
|
|
CoordinateType |
type = Geodetic |
|
) |
| |
|
static |
◆ calc_distance() [2/2]
float gridpp::KDTree::calc_distance |
( |
float |
x0, |
|
|
float |
y0, |
|
|
float |
z0, |
|
|
float |
x1, |
|
|
float |
y1, |
|
|
float |
z1 |
|
) |
| |
|
static |
◆ calc_distance_fast() [1/2]
float gridpp::KDTree::calc_distance_fast |
( |
float |
lat1, |
|
|
float |
lon1, |
|
|
float |
lat2, |
|
|
float |
lon2, |
|
|
CoordinateType |
type = Geodetic |
|
) |
| |
|
static |
◆ calc_distance_fast() [2/2]
float gridpp::KDTree::calc_distance_fast |
( |
const Point & |
p1, |
|
|
const Point & |
p2 |
|
) |
| |
|
static |
◆ convert_coordinates() [1/2]
bool gridpp::KDTree::convert_coordinates |
( |
const vec & |
lats, |
|
|
const vec & |
lons, |
|
|
vec & |
x_coords, |
|
|
vec & |
y_coords, |
|
|
vec & |
z_coords |
|
) |
| const |
Convert lat/lons to 3D cartesian coordinates with the centre of the earth as the origin.
- Parameters
-
lats | vector of latitudes [deg] |
lons | vector of longitudes [deg] |
x_coords | vector of x-coordinates [m] |
y_coords | vector of y-coordinates [m] |
z_coords | vector of z-coordinates [m] |
◆ convert_coordinates() [2/2]
bool gridpp::KDTree::convert_coordinates |
( |
float |
lat, |
|
|
float |
lon, |
|
|
float & |
x_coord, |
|
|
float & |
y_coord, |
|
|
float & |
z_coord |
|
) |
| const |
Same as above, but convert a single lat/lon to 3D cartesian coordinates.
- Parameters
-
lat | latitude [deg] |
lon | longitude [deg] |
x_coord | x-coordinate [m] |
y_coord | y-coordinate [m] |
z_coord | z-coordinate [m] |
◆ deg2rad()
float gridpp::KDTree::deg2rad |
( |
float |
deg | ) |
|
|
static |
◆ get_closest_neighbours()
ivec gridpp::KDTree::get_closest_neighbours |
( |
float |
lat, |
|
|
float |
lon, |
|
|
int |
num |
|
) |
| 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 |
|
) |
| 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 |
|
) |
| 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 |
|
) |
| 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 |
|
) |
| const |
Find the number of points within a radius.
- Parameters
-
lat | Latitude of lookup-point |
lon | Longitude of lookup-point |
radius | Lookup radius [m] |
◆ 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
The documentation for this class was generated from the following files:
- /home/thomasn/repos/gridpplib/include/gridpp.h
- /home/thomasn/repos/gridpplib/src/api/kdtree.cpp