File indexing completed on 2025-01-18 09:36:45
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef BOOST_GEOMETRY_STRATEGIES_GEOGRAPHIC_DISTANCE_DETAIL_HPP
0015 #define BOOST_GEOMETRY_STRATEGIES_GEOGRAPHIC_DISTANCE_DETAIL_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
0043
0044
0045
0046 template
0047 <
0048 typename Spheroid = srs::spheroid<double>,
0049 typename CalculationType = void
0050 >
0051 class andoyer
0052 : public strategy::distance::geographic
0053 <
0054 strategy::andoyer, Spheroid, CalculationType
0055 >
0056 {
0057 typedef strategy::distance::geographic
0058 <
0059 strategy::andoyer, Spheroid, CalculationType
0060 > base_type;
0061
0062 public :
0063 inline andoyer()
0064 : base_type()
0065 {}
0066
0067 explicit inline andoyer(Spheroid const& spheroid)
0068 : base_type(spheroid)
0069 {}
0070 };
0071
0072
0073 #ifndef DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
0074 namespace services
0075 {
0076
0077 template <typename Spheroid, typename CalculationType>
0078 struct tag<andoyer<Spheroid, CalculationType> >
0079 {
0080 typedef strategy_tag_distance_point_point type;
0081 };
0082
0083
0084 template <typename Spheroid, typename CalculationType, typename P1, typename P2>
0085 struct return_type<andoyer<Spheroid, CalculationType>, P1, P2>
0086 : andoyer<Spheroid, CalculationType>::template calculation_type<P1, P2>
0087 {};
0088
0089
0090 template <typename Spheroid, typename CalculationType>
0091 struct comparable_type<andoyer<Spheroid, CalculationType> >
0092 {
0093 typedef andoyer<Spheroid, CalculationType> type;
0094 };
0095
0096
0097 template <typename Spheroid, typename CalculationType>
0098 struct get_comparable<andoyer<Spheroid, CalculationType> >
0099 {
0100 static inline andoyer<Spheroid, CalculationType> apply(andoyer<Spheroid, CalculationType> const& input)
0101 {
0102 return input;
0103 }
0104 };
0105
0106 template <typename Spheroid, typename CalculationType, typename P1, typename P2>
0107 struct result_from_distance<andoyer<Spheroid, CalculationType>, P1, P2>
0108 {
0109 template <typename T>
0110 static inline typename return_type<andoyer<Spheroid, CalculationType>, P1, P2>::type
0111 apply(andoyer<Spheroid, CalculationType> const& , T const& value)
0112 {
0113 return value;
0114 }
0115 };
0116
0117
0118 }
0119 #endif
0120
0121
0122 }}
0123
0124
0125 }}
0126
0127
0128 #endif