3 // Copyright (c) 2017-2020, Oracle and/or its affiliates.
4 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
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)
10 #ifndef BOOST_GEOMETRY_STRATEGIES_GEOGRAPHIC_PARAMETERS_HPP
11 #define BOOST_GEOMETRY_STRATEGIES_GEOGRAPHIC_PARAMETERS_HPP
13 #include <type_traits>
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>
25 namespace boost { namespace geometry { namespace strategy
33 bool EnableCoordinates = true,
34 bool EnableReverseAzimuth = false,
35 bool EnableReducedLength = false,
36 bool EnableGeodesicScale = false
39 : formula::thomas_direct
42 EnableCoordinates, EnableReverseAzimuth,
43 EnableReducedLength, EnableGeodesicScale
52 bool EnableReverseAzimuth = false,
53 bool EnableReducedLength = false,
54 bool EnableGeodesicScale = false
57 : formula::andoyer_inverse
60 EnableAzimuth, EnableReverseAzimuth,
61 EnableReducedLength, EnableGeodesicScale
71 bool EnableCoordinates = true,
72 bool EnableReverseAzimuth = false,
73 bool EnableReducedLength = false,
74 bool EnableGeodesicScale = false
77 : formula::thomas_direct
80 EnableCoordinates, EnableReverseAzimuth,
81 EnableReducedLength, EnableGeodesicScale
90 bool EnableReverseAzimuth = false,
91 bool EnableReducedLength = false,
92 bool EnableGeodesicScale = false
95 : formula::thomas_inverse
98 EnableAzimuth, EnableReverseAzimuth,
99 EnableReducedLength, EnableGeodesicScale
109 bool EnableCoordinates = true,
110 bool EnableReverseAzimuth = false,
111 bool EnableReducedLength = false,
112 bool EnableGeodesicScale = false
115 : formula::vincenty_direct
117 CT, EnableCoordinates, EnableReverseAzimuth,
118 EnableReducedLength, EnableGeodesicScale
127 bool EnableReverseAzimuth = false,
128 bool EnableReducedLength = false,
129 bool EnableGeodesicScale = false
132 : formula::vincenty_inverse
135 EnableAzimuth, EnableReverseAzimuth,
136 EnableReducedLength, EnableGeodesicScale
146 bool EnableCoordinates = true,
147 bool EnableReverseAzimuth = false,
148 bool EnableReducedLength = false,
149 bool EnableGeodesicScale = false,
150 size_t SeriesOrder = 8
153 : formula::karney_direct
155 CT, EnableCoordinates, EnableReverseAzimuth,
156 EnableReducedLength, EnableGeodesicScale,
166 bool EnableReverseAzimuth = false,
167 bool EnableReducedLength = false,
168 bool EnableGeodesicScale = false,
169 size_t SeriesOrder = 8
172 : formula::karney_inverse
175 EnableAzimuth, EnableReverseAzimuth,
176 EnableReducedLength, EnableGeodesicScale,
182 template <typename FormulaPolicy>
185 BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
186 "Not implemented for this type.",
191 struct default_order<andoyer>
192 : std::integral_constant<unsigned int, 1>
196 struct default_order<thomas>
197 : std::integral_constant<unsigned int, 2>
201 struct default_order<vincenty>
202 : std::integral_constant<unsigned int, 4>
206 struct default_order<karney>
207 : std::integral_constant<unsigned int, 8>
211 }}} // namespace boost::geometry::strategy
214 #endif // BOOST_GEOMETRY_STRATEGIES_GEOGRAPHIC_PARAMETERS_HPP