20 #include <boost/geometry/algorithms/distance.hpp> 21 #include <boost/geometry/algorithms/within.hpp> 22 #include <boost/geometry/core/access.hpp> 23 #include <boost/geometry/geometries/box.hpp> 24 #include <boost/geometry/strategies/geographic/distance.hpp> 28 namespace geogrid_detail {
36 return boost::geometry::within(
m_pt, boost::geometry::model::box<Coordinate>{box.
lower.m_pt, box.
upper.m_pt});
43 return boost::geometry::distance(
m_pt, other.
m_pt, boost::geometry::strategy::distance::geographic<>{}) /
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?
KdTree2DPoint()
Default constructor.
bool InBox(const AABBox< KdTree2DPoint > &box) const
Namespace for the geographic and demograhic classes.
P lower
The lower bound for every dimension.
P upper
The upper bound for every dimension.
KdTree for some more information on methods.
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.
Coordinate m_pt
Shortcut for access without dereferencing.
Location for use within the GeoGrid, contains Coordinate and index to ContactPools.