File indexing completed on 2025-01-18 09:36:46
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef BOOST_GEOMETRY_STRATEGIES_GEOGRAPHIC_VINCENTY_HPP
0015 #define BOOST_GEOMETRY_STRATEGIES_GEOGRAPHIC_VINCENTY_HPP
0016
0017
0018 #include <boost/geometry/strategies/geographic/distance.hpp>
0019 #include <boost/geometry/strategies/geographic/parameters.hpp>
0020
0021
0022 namespace boost { namespace geometry
0023 {
0024
0025 namespace strategy { namespace distance
0026 {
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042 template
0043 <
0044 typename Spheroid = srs::spheroid<double>,
0045 typename CalculationType = void
0046 >
0047 class vincenty
0048 : public strategy::distance::geographic
0049 <
0050 strategy::vincenty, Spheroid, CalculationType
0051 >
0052 {
0053 typedef strategy::distance::geographic
0054 <
0055 strategy::vincenty, Spheroid, CalculationType
0056 > base_type;
0057
0058 public:
0059 inline vincenty()
0060 : base_type()
0061 {}
0062
0063 explicit inline vincenty(Spheroid const& spheroid)
0064 : base_type(spheroid)
0065 {}
0066 };
0067
0068 #ifndef DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
0069 namespace services
0070 {
0071
0072 template <typename Spheroid, typename CalculationType>
0073 struct tag<vincenty<Spheroid, CalculationType> >
0074 {
0075 typedef strategy_tag_distance_point_point type;
0076 };
0077
0078
0079 template <typename Spheroid, typename CalculationType, typename P1, typename P2>
0080 struct return_type<vincenty<Spheroid, CalculationType>, P1, P2>
0081 : vincenty<Spheroid, CalculationType>::template calculation_type<P1, P2>
0082 {};
0083
0084
0085 template <typename Spheroid, typename CalculationType>
0086 struct comparable_type<vincenty<Spheroid, CalculationType> >
0087 {
0088 typedef vincenty<Spheroid, CalculationType> type;
0089 };
0090
0091
0092 template <typename Spheroid, typename CalculationType>
0093 struct get_comparable<vincenty<Spheroid, CalculationType> >
0094 {
0095 static inline vincenty<Spheroid, CalculationType> apply(vincenty<Spheroid, CalculationType> const& input)
0096 {
0097 return input;
0098 }
0099 };
0100
0101 template <typename Spheroid, typename CalculationType, typename P1, typename P2>
0102 struct result_from_distance<vincenty<Spheroid, CalculationType>, P1, P2 >
0103 {
0104 template <typename T>
0105 static inline typename return_type<vincenty<Spheroid, CalculationType>, P1, P2>::type
0106 apply(vincenty<Spheroid, CalculationType> const& , T const& value)
0107 {
0108 return value;
0109 }
0110 };
0111
0112
0113 }
0114 #endif
0115
0116
0117
0118
0119
0120
0121 }}
0122
0123
0124 }}
0125
0126
0127 #endif