1 // Boost.Geometry 2 3 // Copyright (c) 2017, Oracle and/or its affiliates. 4 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle 5 6 // Use, modification and distribution is subject to the Boost Software License, 7 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 8 // http://www.boost.org/LICENSE_1_0.txt) 9 10 #ifndef BOOST_GEOMETRY_STRATEGIES_GEOGRAPHIC_PARAMETERS_HPP 11 #define BOOST_GEOMETRY_STRATEGIES_GEOGRAPHIC_PARAMETERS_HPP 12 13 14 #include <boost/geometry/formulas/andoyer_inverse.hpp> 15 #include <boost/geometry/formulas/thomas_inverse.hpp> 16 #include <boost/geometry/formulas/vincenty_inverse.hpp> 17 18 #include <boost/mpl/assert.hpp> 19 #include <boost/mpl/integral_c.hpp> 20 21 22 namespace boost { namespace geometry { namespace strategy 23 { 24 25 struct andoyer 26 { 27 template 28 < 29 typename CT, 30 bool EnableDistance, 31 bool EnableAzimuth, 32 bool EnableReverseAzimuth = false, 33 bool EnableReducedLength = false, 34 bool EnableGeodesicScale = false 35 > 36 struct inverse 37 : formula::andoyer_inverse 38 < 39 CT, EnableDistance, 40 EnableAzimuth, EnableReverseAzimuth, 41 EnableReducedLength, EnableGeodesicScale 42 > 43 {}; 44 }; 45 46 struct thomas 47 { 48 template 49 < 50 typename CT, 51 bool EnableDistance, 52 bool EnableAzimuth, 53 bool EnableReverseAzimuth = false, 54 bool EnableReducedLength = false, 55 bool EnableGeodesicScale = false 56 > 57 struct inverse 58 : formula::thomas_inverse 59 < 60 CT, EnableDistance, 61 EnableAzimuth, EnableReverseAzimuth, 62 EnableReducedLength, EnableGeodesicScale 63 > 64 {}; 65 }; 66 67 struct vincenty 68 { 69 template 70 < 71 typename CT, 72 bool EnableDistance, 73 bool EnableAzimuth, 74 bool EnableReverseAzimuth = false, 75 bool EnableReducedLength = false, 76 bool EnableGeodesicScale = false 77 > 78 struct inverse 79 : formula::vincenty_inverse 80 < 81 CT, EnableDistance, 82 EnableAzimuth, EnableReverseAzimuth, 83 EnableReducedLength, EnableGeodesicScale 84 > 85 {}; 86 }; 87 88 89 template <typename FormulaPolicy> 90 struct default_order 91 { 92 BOOST_MPL_ASSERT_MSG 93 ( 94 false, NOT_IMPLEMENTED_FOR_THIS_TYPE 95 , (types<FormulaPolicy>) 96 ); 97 }; 98 99 template<> 100 struct default_order<andoyer> 101 : boost::mpl::integral_c<unsigned int, 1> 102 {}; 103 104 template<> 105 struct default_order<thomas> 106 : boost::mpl::integral_c<unsigned int, 2> 107 {}; 108 109 template<> 110 struct default_order<vincenty> 111 : boost::mpl::integral_c<unsigned int, 4> 112 {}; 113 114 }}} // namespace boost::geometry::strategy 115 116 117 #endif // BOOST_GEOMETRY_STRATEGIES_GEOGRAPHIC_PARAMETERS_HPP 118