File indexing completed on 2025-01-18 09:36:47
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef BOOST_GEOMETRY_STRATEGIES_GEOGRAPHIC_PARAMETERS_HPP
0011 #define BOOST_GEOMETRY_STRATEGIES_GEOGRAPHIC_PARAMETERS_HPP
0012
0013 #include <type_traits>
0014
0015 #include <boost/geometry/core/static_assert.hpp>
0016 #include <boost/geometry/formulas/andoyer_inverse.hpp>
0017 #include <boost/geometry/formulas/thomas_direct.hpp>
0018 #include <boost/geometry/formulas/thomas_inverse.hpp>
0019 #include <boost/geometry/formulas/vincenty_direct.hpp>
0020 #include <boost/geometry/formulas/vincenty_inverse.hpp>
0021 #include <boost/geometry/formulas/karney_direct.hpp>
0022 #include <boost/geometry/formulas/karney_inverse.hpp>
0023
0024
0025 namespace boost { namespace geometry { namespace strategy
0026 {
0027
0028 struct andoyer
0029 {
0030 template
0031 <
0032 typename CT,
0033 bool EnableCoordinates = true,
0034 bool EnableReverseAzimuth = false,
0035 bool EnableReducedLength = false,
0036 bool EnableGeodesicScale = false
0037 >
0038 struct direct
0039 : formula::thomas_direct
0040 <
0041 CT, false,
0042 EnableCoordinates, EnableReverseAzimuth,
0043 EnableReducedLength, EnableGeodesicScale
0044 >
0045 {};
0046
0047 template
0048 <
0049 typename CT,
0050 bool EnableDistance,
0051 bool EnableAzimuth,
0052 bool EnableReverseAzimuth = false,
0053 bool EnableReducedLength = false,
0054 bool EnableGeodesicScale = false
0055 >
0056 struct inverse
0057 : formula::andoyer_inverse
0058 <
0059 CT, EnableDistance,
0060 EnableAzimuth, EnableReverseAzimuth,
0061 EnableReducedLength, EnableGeodesicScale
0062 >
0063 {};
0064 };
0065
0066 struct thomas
0067 {
0068 template
0069 <
0070 typename CT,
0071 bool EnableCoordinates = true,
0072 bool EnableReverseAzimuth = false,
0073 bool EnableReducedLength = false,
0074 bool EnableGeodesicScale = false
0075 >
0076 struct direct
0077 : formula::thomas_direct
0078 <
0079 CT, true,
0080 EnableCoordinates, EnableReverseAzimuth,
0081 EnableReducedLength, EnableGeodesicScale
0082 >
0083 {};
0084
0085 template
0086 <
0087 typename CT,
0088 bool EnableDistance,
0089 bool EnableAzimuth,
0090 bool EnableReverseAzimuth = false,
0091 bool EnableReducedLength = false,
0092 bool EnableGeodesicScale = false
0093 >
0094 struct inverse
0095 : formula::thomas_inverse
0096 <
0097 CT, EnableDistance,
0098 EnableAzimuth, EnableReverseAzimuth,
0099 EnableReducedLength, EnableGeodesicScale
0100 >
0101 {};
0102 };
0103
0104 struct vincenty
0105 {
0106 template
0107 <
0108 typename CT,
0109 bool EnableCoordinates = true,
0110 bool EnableReverseAzimuth = false,
0111 bool EnableReducedLength = false,
0112 bool EnableGeodesicScale = false
0113 >
0114 struct direct
0115 : formula::vincenty_direct
0116 <
0117 CT, EnableCoordinates, EnableReverseAzimuth,
0118 EnableReducedLength, EnableGeodesicScale
0119 >
0120 {};
0121
0122 template
0123 <
0124 typename CT,
0125 bool EnableDistance,
0126 bool EnableAzimuth,
0127 bool EnableReverseAzimuth = false,
0128 bool EnableReducedLength = false,
0129 bool EnableGeodesicScale = false
0130 >
0131 struct inverse
0132 : formula::vincenty_inverse
0133 <
0134 CT, EnableDistance,
0135 EnableAzimuth, EnableReverseAzimuth,
0136 EnableReducedLength, EnableGeodesicScale
0137 >
0138 {};
0139 };
0140
0141 struct karney
0142 {
0143 template
0144 <
0145 typename CT,
0146 bool EnableCoordinates = true,
0147 bool EnableReverseAzimuth = false,
0148 bool EnableReducedLength = false,
0149 bool EnableGeodesicScale = false
0150 >
0151 struct direct
0152 : formula::karney_direct
0153 <
0154 CT, EnableCoordinates, EnableReverseAzimuth,
0155 EnableReducedLength, EnableGeodesicScale
0156 >
0157 {};
0158
0159 template
0160 <
0161 typename CT,
0162 bool EnableDistance,
0163 bool EnableAzimuth,
0164 bool EnableReverseAzimuth = false,
0165 bool EnableReducedLength = false,
0166 bool EnableGeodesicScale = false
0167 >
0168 struct inverse
0169 : formula::karney_inverse
0170 <
0171 CT, EnableDistance,
0172 EnableAzimuth, EnableReverseAzimuth,
0173 EnableReducedLength, EnableGeodesicScale
0174 >
0175 {};
0176 };
0177
0178 template <typename FormulaPolicy>
0179 struct default_order
0180 {
0181 BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
0182 "Not implemented for this type.",
0183 FormulaPolicy);
0184 };
0185
0186 template<>
0187 struct default_order<andoyer>
0188 : std::integral_constant<unsigned int, 1>
0189 {};
0190
0191 template<>
0192 struct default_order<thomas>
0193 : std::integral_constant<unsigned int, 2>
0194 {};
0195
0196 template<>
0197 struct default_order<vincenty>
0198 : std::integral_constant<unsigned int, 4>
0199 {};
0200
0201 template<>
0202 struct default_order<karney>
0203 : std::integral_constant<unsigned int, 8>
0204 {};
0205
0206
0207 }}}
0208
0209
0210 #endif