Back to home page

EIC code displayed by LXR

 
 

    


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

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_AZIMUTH_GEOGRAPHIC_HPP
0011 #define BOOST_GEOMETRY_STRATEGIES_AZIMUTH_GEOGRAPHIC_HPP
0012 
0013 
0014 // TODO: move this file to boost/geometry/strategy
0015 #include <boost/geometry/strategies/geographic/azimuth.hpp>
0016 
0017 #include <boost/geometry/strategies/azimuth/services.hpp>
0018 #include <boost/geometry/strategies/detail.hpp>
0019 
0020 
0021 namespace boost { namespace geometry
0022 {
0023 
0024 namespace strategies { namespace azimuth
0025 {
0026 
0027 template
0028 <
0029     typename FormulaPolicy = strategy::andoyer,
0030     typename Spheroid = srs::spheroid<double>,
0031     typename CalculationType = void
0032 >
0033 class geographic : strategies::detail::geographic_base<Spheroid>
0034 {
0035     using base_t = strategies::detail::geographic_base<Spheroid>;
0036 
0037 public:
0038     geographic()
0039         : base_t()
0040     {}
0041 
0042     explicit geographic(Spheroid const& spheroid)
0043         : base_t(spheroid)
0044     {}
0045 
0046     auto azimuth() const
0047     {
0048         return strategy::azimuth::geographic
0049             <
0050                 FormulaPolicy, Spheroid, CalculationType
0051             >(base_t::m_spheroid);
0052     }
0053 };
0054 
0055 
0056 namespace services
0057 {
0058 
0059 template <typename Point1, typename Point2>
0060 struct default_strategy<Point1, Point2, geographic_tag, geographic_tag>
0061 {
0062     using type = strategies::azimuth::geographic<>;
0063 };
0064 
0065 
0066 template <typename FP, typename S, typename CT>
0067 struct strategy_converter<strategy::azimuth::geographic<FP, S, CT> >
0068 {
0069     static auto get(strategy::azimuth::geographic<FP, S, CT> const& strategy)
0070     {
0071         return strategies::azimuth::geographic<FP, S, CT>(strategy.model());
0072     }
0073 };
0074 
0075 } // namespace services
0076 
0077 }} // namespace strategies::azimuth
0078 
0079 }} // namespace boost::geometry
0080 
0081 #endif // BOOST_GEOMETRY_STRATEGIES_AZIMUTH_GEOGRAPHIC_HPP