diff options
Diffstat (limited to 'boost/geometry/strategies/geographic/distance_cross_track_point_box.hpp')
-rw-r--r-- | boost/geometry/strategies/geographic/distance_cross_track_point_box.hpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/boost/geometry/strategies/geographic/distance_cross_track_point_box.hpp b/boost/geometry/strategies/geographic/distance_cross_track_point_box.hpp index 016427428c..4508d5acb5 100644 --- a/boost/geometry/strategies/geographic/distance_cross_track_point_box.hpp +++ b/boost/geometry/strategies/geographic/distance_cross_track_point_box.hpp @@ -62,14 +62,22 @@ template class geographic_cross_track_point_box { public: - typedef geographic_cross_track<FormulaPolicy, Spheroid, CalculationType> Strategy; + // point-point strategy getters + struct distance_ps_strategy + { + typedef geographic_cross_track<FormulaPolicy, Spheroid, CalculationType> type; + }; template <typename Point, typename Box> struct return_type - : services::return_type<Strategy, Point, typename point_type<Box>::type> + : services::return_type<typename distance_ps_strategy::type, + Point, typename point_type<Box>::type> {}; - inline geographic_cross_track_point_box() + //constructor + + explicit geographic_cross_track_point_box(Spheroid const& spheroid = Spheroid()) + : m_spheroid(spheroid) {} template <typename Point, typename Box> @@ -91,8 +99,12 @@ public: typedef typename return_type<Point, Box>::type return_type; return details::cross_track_point_box_generic - <return_type>::apply(point, box, Strategy()); + <return_type>::apply(point, box, + typename distance_ps_strategy::type(m_spheroid)); } + +private : + Spheroid m_spheroid; }; |