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