21 #include <boost/geometry/core/access.hpp> 28 namespace geogrid_detail {
35 constexpr
static std::size_t
dim = 2;
38 template <std::
size_t D>
61 template <std::
size_t D>
64 static_assert(0 <= D && D <= 1,
"Dimension should be in range");
65 return boost::geometry::get<D>(
m_pt);
AxisAlignedBoundingBox (hyperrectangle defined by lower and upper bound for every dimension)...
bool InRadius(const KdTree2DPoint &start, double radius) const
Does the point lie within radius km from start?
const Location * GetLocation() const
Retrieve the location.
Coordinate GetPoint() const
Get the coordinate for this Location.
KdTree2DPoint()
Default constructor.
bool InBox(const AABBox< KdTree2DPoint > &box) const
Namespace for the geographic and demograhic classes.
static constexpr std::size_t dim
KdTree for some more information on methods.
boost::geometry::model::point< double, 2, boost::geometry::cs::geographic< boost::geometry::degree >> Coordinate
double Distance(const KdTree2DPoint &other) const
Distance in kilometers, following great circle distance on a speroid earth.
bool operator==(const KdTree2DPoint &other) const
Equal if within one meter of one another.
const Location * m_location
The underlying location.
Coordinate m_pt
Shortcut for access without dereferencing.
Location for use within the GeoGrid, contains Coordinate and index to ContactPools.
KdTree2DPoint(double longt, double lat)
Constructor with longitude and latitude.