]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/geometry/strategies/geographic/parameters.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / geometry / strategies / geographic / parameters.hpp
CommitLineData
b32b8144
FG
1// Boost.Geometry
2
20effc67 3// Copyright (c) 2017-2020, Oracle and/or its affiliates.
b32b8144
FG
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
20effc67
TL
13#include <type_traits>
14
15#include <boost/geometry/core/static_assert.hpp>
b32b8144
FG
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>
1e59de90
TL
21#include <boost/geometry/formulas/karney_direct.hpp>
22#include <boost/geometry/formulas/karney_inverse.hpp>
b32b8144 23
b32b8144
FG
24
25namespace boost { namespace geometry { namespace strategy
26{
27
28struct andoyer
29{
b32b8144
FG
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 <
92f5a8d4
TL
41 CT, false,
42 EnableCoordinates, EnableReverseAzimuth,
b32b8144
FG
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
66struct 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 <
92f5a8d4
TL
79 CT, true,
80 EnableCoordinates, EnableReverseAzimuth,
b32b8144
FG
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
104struct 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};
1e59de90 140
92f5a8d4
TL
141struct karney
142{
143 template
144 <
145 typename CT,
146 bool EnableCoordinates = true,
147 bool EnableReverseAzimuth = false,
148 bool EnableReducedLength = false,
1e59de90 149 bool EnableGeodesicScale = false
92f5a8d4
TL
150 >
151 struct direct
152 : formula::karney_direct
153 <
154 CT, EnableCoordinates, EnableReverseAzimuth,
1e59de90 155 EnableReducedLength, EnableGeodesicScale
92f5a8d4
TL
156 >
157 {};
b32b8144 158
92f5a8d4
TL
159 template
160 <
161 typename CT,
162 bool EnableDistance,
163 bool EnableAzimuth,
164 bool EnableReverseAzimuth = false,
165 bool EnableReducedLength = false,
1e59de90 166 bool EnableGeodesicScale = false
92f5a8d4
TL
167 >
168 struct inverse
169 : formula::karney_inverse
170 <
171 CT, EnableDistance,
172 EnableAzimuth, EnableReverseAzimuth,
1e59de90 173 EnableReducedLength, EnableGeodesicScale
92f5a8d4
TL
174 >
175 {};
176};
1e59de90 177
b32b8144
FG
178template <typename FormulaPolicy>
179struct default_order
180{
20effc67
TL
181 BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
182 "Not implemented for this type.",
183 FormulaPolicy);
b32b8144
FG
184};
185
186template<>
187struct default_order<andoyer>
20effc67 188 : std::integral_constant<unsigned int, 1>
b32b8144
FG
189{};
190
191template<>
192struct default_order<thomas>
20effc67 193 : std::integral_constant<unsigned int, 2>
b32b8144
FG
194{};
195
196template<>
197struct default_order<vincenty>
20effc67 198 : std::integral_constant<unsigned int, 4>
b32b8144 199{};
1e59de90 200
92f5a8d4
TL
201template<>
202struct default_order<karney>
20effc67 203 : std::integral_constant<unsigned int, 8>
92f5a8d4 204{};
1e59de90 205
b32b8144
FG
206
207}}} // namespace boost::geometry::strategy
208
209
210#endif // BOOST_GEOMETRY_STRATEGIES_GEOGRAPHIC_PARAMETERS_HPP