]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/geometry/strategies/geographic/parameters.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / boost / geometry / strategies / geographic / parameters.hpp
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_direct.hpp>
16 #include <boost/geometry/formulas/thomas_inverse.hpp>
17 #include <boost/geometry/formulas/vincenty_direct.hpp>
18 #include <boost/geometry/formulas/vincenty_inverse.hpp>
19
20 #include <boost/mpl/assert.hpp>
21 #include <boost/mpl/integral_c.hpp>
22
23
24 namespace boost { namespace geometry { namespace strategy
25 {
26
27 struct andoyer
28 {
29 //TODO: this should be replaced by an andoyer direct formula
30 template
31 <
32 typename CT,
33 bool EnableCoordinates = true,
34 bool EnableReverseAzimuth = false,
35 bool EnableReducedLength = false,
36 bool EnableGeodesicScale = false
37 >
38 struct direct
39 : formula::thomas_direct
40 <
41 CT, EnableCoordinates, EnableReverseAzimuth,
42 EnableReducedLength, EnableGeodesicScale
43 >
44 {};
45
46 template
47 <
48 typename CT,
49 bool EnableDistance,
50 bool EnableAzimuth,
51 bool EnableReverseAzimuth = false,
52 bool EnableReducedLength = false,
53 bool EnableGeodesicScale = false
54 >
55 struct inverse
56 : formula::andoyer_inverse
57 <
58 CT, EnableDistance,
59 EnableAzimuth, EnableReverseAzimuth,
60 EnableReducedLength, EnableGeodesicScale
61 >
62 {};
63 };
64
65 struct thomas
66 {
67 template
68 <
69 typename CT,
70 bool EnableCoordinates = true,
71 bool EnableReverseAzimuth = false,
72 bool EnableReducedLength = false,
73 bool EnableGeodesicScale = false
74 >
75 struct direct
76 : formula::thomas_direct
77 <
78 CT, EnableCoordinates, EnableReverseAzimuth,
79 EnableReducedLength, EnableGeodesicScale
80 >
81 {};
82
83 template
84 <
85 typename CT,
86 bool EnableDistance,
87 bool EnableAzimuth,
88 bool EnableReverseAzimuth = false,
89 bool EnableReducedLength = false,
90 bool EnableGeodesicScale = false
91 >
92 struct inverse
93 : formula::thomas_inverse
94 <
95 CT, EnableDistance,
96 EnableAzimuth, EnableReverseAzimuth,
97 EnableReducedLength, EnableGeodesicScale
98 >
99 {};
100 };
101
102 struct vincenty
103 {
104 template
105 <
106 typename CT,
107 bool EnableCoordinates = true,
108 bool EnableReverseAzimuth = false,
109 bool EnableReducedLength = false,
110 bool EnableGeodesicScale = false
111 >
112 struct direct
113 : formula::vincenty_direct
114 <
115 CT, EnableCoordinates, EnableReverseAzimuth,
116 EnableReducedLength, EnableGeodesicScale
117 >
118 {};
119
120 template
121 <
122 typename CT,
123 bool EnableDistance,
124 bool EnableAzimuth,
125 bool EnableReverseAzimuth = false,
126 bool EnableReducedLength = false,
127 bool EnableGeodesicScale = false
128 >
129 struct inverse
130 : formula::vincenty_inverse
131 <
132 CT, EnableDistance,
133 EnableAzimuth, EnableReverseAzimuth,
134 EnableReducedLength, EnableGeodesicScale
135 >
136 {};
137 };
138
139
140 template <typename FormulaPolicy>
141 struct default_order
142 {
143 BOOST_MPL_ASSERT_MSG
144 (
145 false, NOT_IMPLEMENTED_FOR_THIS_TYPE
146 , (types<FormulaPolicy>)
147 );
148 };
149
150 template<>
151 struct default_order<andoyer>
152 : boost::mpl::integral_c<unsigned int, 1>
153 {};
154
155 template<>
156 struct default_order<thomas>
157 : boost::mpl::integral_c<unsigned int, 2>
158 {};
159
160 template<>
161 struct default_order<vincenty>
162 : boost::mpl::integral_c<unsigned int, 4>
163 {};
164
165 }}} // namespace boost::geometry::strategy
166
167
168 #endif // BOOST_GEOMETRY_STRATEGIES_GEOGRAPHIC_PARAMETERS_HPP