File indexing completed on 2025-01-18 09:36:47
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef BOOST_GEOMETRY_STRATEGIES_LINE_INTERPOLATE_GEOGRAPHIC_HPP
0010 #define BOOST_GEOMETRY_STRATEGIES_LINE_INTERPOLATE_GEOGRAPHIC_HPP
0011
0012
0013 #include <boost/geometry/strategies/detail.hpp>
0014
0015 #include <boost/geometry/strategies/distance/detail.hpp>
0016
0017 #include <boost/geometry/strategies/geographic/distance.hpp>
0018 #include <boost/geometry/strategies/geographic/line_interpolate.hpp>
0019
0020 #include <boost/geometry/strategies/line_interpolate/services.hpp>
0021
0022
0023 namespace boost { namespace geometry
0024 {
0025
0026 namespace strategies { namespace line_interpolate
0027 {
0028
0029 template
0030 <
0031 typename FormulaPolicy = strategy::andoyer,
0032 typename Spheroid = srs::spheroid<double>,
0033 typename CalculationType = void
0034 >
0035 class geographic
0036 : public strategies::detail::geographic_base<Spheroid>
0037 {
0038 using base_t = strategies::detail::geographic_base<Spheroid>;
0039
0040 public:
0041 geographic() = default;
0042
0043 explicit geographic(Spheroid const& spheroid)
0044 : base_t(spheroid)
0045 {}
0046
0047 template <typename Geometry1, typename Geometry2>
0048 auto distance(Geometry1 const&, Geometry2 const&,
0049 distance::detail::enable_if_pp_t<Geometry1, Geometry2> * = nullptr) const
0050 {
0051 return strategy::distance::geographic
0052 <
0053 FormulaPolicy, Spheroid, CalculationType
0054 >(base_t::m_spheroid);
0055 }
0056
0057 template <typename Geometry>
0058 auto line_interpolate(Geometry const&) const
0059 {
0060 return strategy::line_interpolate::geographic
0061 <
0062 FormulaPolicy, Spheroid, CalculationType
0063 >(base_t::m_spheroid);
0064 }
0065 };
0066
0067
0068 namespace services
0069 {
0070
0071 template <typename Geometry>
0072 struct default_strategy<Geometry, geographic_tag>
0073 {
0074 using type = strategies::line_interpolate::geographic<>;
0075 };
0076
0077
0078 template <typename FP, typename S, typename CT>
0079 struct strategy_converter<strategy::line_interpolate::geographic<FP, S, CT> >
0080 {
0081 static auto get(strategy::line_interpolate::geographic<FP, S, CT> const& s)
0082 {
0083 return strategies::line_interpolate::geographic<FP, S, CT>(s.model());
0084 }
0085 };
0086
0087
0088 }
0089
0090 }}
0091
0092 }}
0093
0094 #endif