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_THOMAS_HPP
0015 #define BOOST_GEOMETRY_STRATEGIES_GEOGRAPHIC_THOMAS_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 template
0041 <
0042 typename Spheroid = srs::spheroid<double>,
0043 typename CalculationType = void
0044 >
0045 class thomas
0046 : public strategy::distance::geographic
0047 <
0048 strategy::thomas, Spheroid, CalculationType
0049 >
0050 {
0051 typedef strategy::distance::geographic
0052 <
0053 strategy::thomas, Spheroid, CalculationType
0054 > base_type;
0055
0056 public :
0057 inline thomas()
0058 : base_type()
0059 {}
0060
0061 explicit inline thomas(Spheroid const& spheroid)
0062 : base_type(spheroid)
0063 {}
0064 };
0065
0066 #ifndef DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
0067 namespace services
0068 {
0069
0070 template <typename Spheroid, typename CalculationType>
0071 struct tag<thomas<Spheroid, CalculationType> >
0072 {
0073 typedef strategy_tag_distance_point_point type;
0074 };
0075
0076
0077 template <typename Spheroid, typename CalculationType, typename P1, typename P2>
0078 struct return_type<thomas<Spheroid, CalculationType>, P1, P2>
0079 : thomas<Spheroid, CalculationType>::template calculation_type<P1, P2>
0080 {};
0081
0082
0083 template <typename Spheroid, typename CalculationType>
0084 struct comparable_type<thomas<Spheroid, CalculationType> >
0085 {
0086 typedef thomas<Spheroid, CalculationType> type;
0087 };
0088
0089
0090 template <typename Spheroid, typename CalculationType>
0091 struct get_comparable<thomas<Spheroid, CalculationType> >
0092 {
0093 static inline thomas<Spheroid, CalculationType> apply(thomas<Spheroid, CalculationType> const& input)
0094 {
0095 return input;
0096 }
0097 };
0098
0099 template <typename Spheroid, typename CalculationType, typename P1, typename P2>
0100 struct result_from_distance<thomas<Spheroid, CalculationType>, P1, P2 >
0101 {
0102 template <typename T>
0103 static inline typename return_type<thomas<Spheroid, CalculationType>, P1, P2>::type
0104 apply(thomas<Spheroid, CalculationType> const& , T const& value)
0105 {
0106 return value;
0107 }
0108 };
0109
0110
0111 }
0112 #endif
0113
0114
0115 }}
0116
0117
0118 }}
0119
0120
0121 #endif