]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/geometry/strategies/geographic/parameters.hpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / boost / geometry / strategies / geographic / parameters.hpp
1 // Boost.Geometry
2
3 // Copyright (c) 2017-2020, 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 #include <type_traits>
14
15 #include <boost/geometry/core/static_assert.hpp>
16 #include <boost/geometry/formulas/andoyer_inverse.hpp>
17 #include <boost/geometry/formulas/thomas_direct.hpp>
18 #include <boost/geometry/formulas/thomas_inverse.hpp>
19 #include <boost/geometry/formulas/vincenty_direct.hpp>
20 #include <boost/geometry/formulas/vincenty_inverse.hpp>
21 //#include <boost/geometry/formulas/karney_direct.hpp>
22 //#include <boost/geometry/formulas/karney_inverse.hpp>
23
24
25 namespace boost { namespace geometry { namespace strategy
26 {
27
28 struct andoyer
29 {
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, false,
42 EnableCoordinates, EnableReverseAzimuth,
43 EnableReducedLength, EnableGeodesicScale
44 >
45 {};
46
47 template
48 <
49 typename CT,
50 bool EnableDistance,
51 bool EnableAzimuth,
52 bool EnableReverseAzimuth = false,
53 bool EnableReducedLength = false,
54 bool EnableGeodesicScale = false
55 >
56 struct inverse
57 : formula::andoyer_inverse
58 <
59 CT, EnableDistance,
60 EnableAzimuth, EnableReverseAzimuth,
61 EnableReducedLength, EnableGeodesicScale
62 >
63 {};
64 };
65
66 struct thomas
67 {
68 template
69 <
70 typename CT,
71 bool EnableCoordinates = true,
72 bool EnableReverseAzimuth = false,
73 bool EnableReducedLength = false,
74 bool EnableGeodesicScale = false
75 >
76 struct direct
77 : formula::thomas_direct
78 <
79 CT, true,
80 EnableCoordinates, EnableReverseAzimuth,
81 EnableReducedLength, EnableGeodesicScale
82 >
83 {};
84
85 template
86 <
87 typename CT,
88 bool EnableDistance,
89 bool EnableAzimuth,
90 bool EnableReverseAzimuth = false,
91 bool EnableReducedLength = false,
92 bool EnableGeodesicScale = false
93 >
94 struct inverse
95 : formula::thomas_inverse
96 <
97 CT, EnableDistance,
98 EnableAzimuth, EnableReverseAzimuth,
99 EnableReducedLength, EnableGeodesicScale
100 >
101 {};
102 };
103
104 struct vincenty
105 {
106 template
107 <
108 typename CT,
109 bool EnableCoordinates = true,
110 bool EnableReverseAzimuth = false,
111 bool EnableReducedLength = false,
112 bool EnableGeodesicScale = false
113 >
114 struct direct
115 : formula::vincenty_direct
116 <
117 CT, EnableCoordinates, EnableReverseAzimuth,
118 EnableReducedLength, EnableGeodesicScale
119 >
120 {};
121
122 template
123 <
124 typename CT,
125 bool EnableDistance,
126 bool EnableAzimuth,
127 bool EnableReverseAzimuth = false,
128 bool EnableReducedLength = false,
129 bool EnableGeodesicScale = false
130 >
131 struct inverse
132 : formula::vincenty_inverse
133 <
134 CT, EnableDistance,
135 EnableAzimuth, EnableReverseAzimuth,
136 EnableReducedLength, EnableGeodesicScale
137 >
138 {};
139 };
140 /*
141 struct karney
142 {
143 template
144 <
145 typename CT,
146 bool EnableCoordinates = true,
147 bool EnableReverseAzimuth = false,
148 bool EnableReducedLength = false,
149 bool EnableGeodesicScale = false,
150 size_t SeriesOrder = 8
151 >
152 struct direct
153 : formula::karney_direct
154 <
155 CT, EnableCoordinates, EnableReverseAzimuth,
156 EnableReducedLength, EnableGeodesicScale,
157 SeriesOrder
158 >
159 {};
160
161 template
162 <
163 typename CT,
164 bool EnableDistance,
165 bool EnableAzimuth,
166 bool EnableReverseAzimuth = false,
167 bool EnableReducedLength = false,
168 bool EnableGeodesicScale = false,
169 size_t SeriesOrder = 8
170 >
171 struct inverse
172 : formula::karney_inverse
173 <
174 CT, EnableDistance,
175 EnableAzimuth, EnableReverseAzimuth,
176 EnableReducedLength, EnableGeodesicScale,
177 SeriesOrder
178 >
179 {};
180 };
181 */
182 template <typename FormulaPolicy>
183 struct default_order
184 {
185 BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
186 "Not implemented for this type.",
187 FormulaPolicy);
188 };
189
190 template<>
191 struct default_order<andoyer>
192 : std::integral_constant<unsigned int, 1>
193 {};
194
195 template<>
196 struct default_order<thomas>
197 : std::integral_constant<unsigned int, 2>
198 {};
199
200 template<>
201 struct default_order<vincenty>
202 : std::integral_constant<unsigned int, 4>
203 {};
204 /*
205 template<>
206 struct default_order<karney>
207 : std::integral_constant<unsigned int, 8>
208 {};
209 */
210
211 }}} // namespace boost::geometry::strategy
212
213
214 #endif // BOOST_GEOMETRY_STRATEGIES_GEOGRAPHIC_PARAMETERS_HPP