Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:36:44

0001 // Boost.Geometry
0002 
0003 // Copyright (c) 2021, Oracle and/or its affiliates.
0004 
0005 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
0006 
0007 // Licensed under the Boost Software License version 1.0.
0008 // http://www.boost.org/users/license.html
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 } // namespace services
0076 
0077 }} // namespace strategies::densify
0078 
0079 }} // namespace boost::geometry
0080 
0081 #endif // BOOST_GEOMETRY_STRATEGIES_DENSIFY_GEOGRAPHIC_HPP