diff --git a/include/boost/geometry/strategies/spherical/distance_segment_box.hpp b/include/boost/geometry/strategies/spherical/distance_segment_box.hpp index 0e9414122..0e5af0f6f 100644 --- a/include/boost/geometry/strategies/spherical/distance_segment_box.hpp +++ b/include/boost/geometry/strategies/spherical/distance_segment_box.hpp @@ -224,9 +224,9 @@ struct spherical_segment_box typedef Strategy type; }; - inline typename distance_pp_strategy::type get_distance_pp_strategy() const + inline Strategy get_distance_pp_strategy() const { - return typename distance_pp_strategy::type(); + return m_strategy; } // point-segment strategy getters struct distance_ps_strategy @@ -236,7 +236,7 @@ struct spherical_segment_box inline typename distance_ps_strategy::type get_distance_ps_strategy() const { - return typename distance_ps_strategy::type(); + return typename distance_ps_strategy::type(m_strategy.radius()); } struct distance_pb_strategy @@ -246,7 +246,7 @@ struct spherical_segment_box inline typename distance_pb_strategy::type get_distance_pb_strategy() const { - return typename distance_pb_strategy::type(); + return typename distance_pb_strategy::type(m_strategy.radius()); } // TODO: why is the Radius not propagated above? @@ -265,6 +265,19 @@ struct spherical_segment_box return equals_point_point_strategy_type(); } + // constructors + + inline spherical_segment_box() + {} + + explicit inline spherical_segment_box(typename Strategy::radius_type const& r) + : m_strategy(r) + {} + + inline spherical_segment_box(Strategy const& s) + : m_strategy(s) + {} + // methods template