Stride Reference Manual  - generated for commit 9643b11
geopop::geogrid_detail::KdTree2DPoint Class Reference

KdTree for some more information on methods. More...

#include <KdTree2DPoint.h>

Collaboration diagram for geopop::geogrid_detail::KdTree2DPoint:
Collaboration graph

Classes

struct  dimension_type
 

Public Member Functions

 KdTree2DPoint ()
 Default constructor. More...
 
 KdTree2DPoint (const Location *loc)
 Constructor with Location. More...
 
 KdTree2DPoint (double longt, double lat)
 Constructor with longitude and latitude. More...
 
bool operator== (const KdTree2DPoint &other) const
 Equal if within one meter of one another. More...
 
double Distance (const KdTree2DPoint &other) const
 Distance in kilometers, following great circle distance on a speroid earth. More...
 
template<std::size_t D>
double Get () const
 
const LocationGetLocation () const
 Retrieve the location. More...
 
Coordinate GetPoint () const
 Get the coordinate for this Location. More...
 
bool InBox (const AABBox< KdTree2DPoint > &box) const
 
bool InRadius (const KdTree2DPoint &start, double radius) const
 Does the point lie within radius km from start? More...
 

Static Public Attributes

static constexpr std::size_t dim = 2
 

Private Attributes

Coordinate m_pt
 Shortcut for access without dereferencing. More...
 
const Locationm_location
 The underlying location. More...
 

Detailed Description

KdTree for some more information on methods.

Definition at line 31 of file KdTree2DPoint.h.

Constructor & Destructor Documentation

geopop::geogrid_detail::KdTree2DPoint::KdTree2DPoint ( )
inline

Default constructor.

Definition at line 46 of file KdTree2DPoint.h.

geopop::geogrid_detail::KdTree2DPoint::KdTree2DPoint ( const Location loc)
explicit

Constructor with Location.

Definition at line 30 of file KdTree2DPoint.cpp.

geopop::geogrid_detail::KdTree2DPoint::KdTree2DPoint ( double  longt,
double  lat 
)
inline

Constructor with longitude and latitude.

Definition at line 52 of file KdTree2DPoint.h.

References Distance(), and operator==().

Here is the call graph for this function:

Member Function Documentation

bool geopop::geogrid_detail::KdTree2DPoint::operator== ( const KdTree2DPoint other) const

Equal if within one meter of one another.

Definition at line 32 of file KdTree2DPoint.cpp.

References Distance().

Referenced by KdTree2DPoint().

Here is the call graph for this function:

Here is the caller graph for this function:

double geopop::geogrid_detail::KdTree2DPoint::Distance ( const KdTree2DPoint other) const

Distance in kilometers, following great circle distance on a speroid earth.

Definition at line 41 of file KdTree2DPoint.cpp.

References m_pt.

Referenced by InRadius(), KdTree2DPoint(), and operator==().

Here is the caller graph for this function:

template<std::size_t D>
double geopop::geogrid_detail::KdTree2DPoint::Get ( ) const
inline

Definition at line 62 of file KdTree2DPoint.h.

References m_pt.

const Location* geopop::geogrid_detail::KdTree2DPoint::GetLocation ( ) const
inline

Retrieve the location.

Definition at line 69 of file KdTree2DPoint.h.

References m_location.

Referenced by geopop::GeoAggregator< Policy >::operator()().

Here is the caller graph for this function:

Coordinate geopop::geogrid_detail::KdTree2DPoint::GetPoint ( ) const
inline

Get the coordinate for this Location.

Definition at line 72 of file KdTree2DPoint.h.

References InBox(), InRadius(), and m_pt.

Referenced by geopop::PolygonPolicy::Contains().

Here is the call graph for this function:

Here is the caller graph for this function:

bool geopop::geogrid_detail::KdTree2DPoint::InBox ( const AABBox< KdTree2DPoint > &  box) const

Definition at line 34 of file KdTree2DPoint.cpp.

References geopop::AABBox< P >::lower, m_pt, and geopop::AABBox< P >::upper.

Referenced by GetPoint().

Here is the caller graph for this function:

bool geopop::geogrid_detail::KdTree2DPoint::InRadius ( const KdTree2DPoint start,
double  radius 
) const

Does the point lie within radius km from start?

Definition at line 39 of file KdTree2DPoint.cpp.

References Distance().

Referenced by geopop::RadiusPolicy::Contains(), and GetPoint().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

constexpr std::size_t geopop::geogrid_detail::KdTree2DPoint::dim = 2
static

Definition at line 35 of file KdTree2DPoint.h.

Coordinate geopop::geogrid_detail::KdTree2DPoint::m_pt
private

Shortcut for access without dereferencing.

Definition at line 81 of file KdTree2DPoint.h.

Referenced by Distance(), Get(), GetPoint(), and InBox().

const Location* geopop::geogrid_detail::KdTree2DPoint::m_location
private

The underlying location.

Definition at line 82 of file KdTree2DPoint.h.

Referenced by GetLocation().


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