1 // Boost.Geometry (aka GGL, Generic Geometry Library)
3 // Copyright (c) 2007-2016 Barend Gehrels, Amsterdam, the Netherlands.
5 // This file was modified by Oracle on 2014, 2017.
6 // Modifications copyright (c) 2014-2017 Oracle and/or its affiliates.
8 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
10 // Use, modification and distribution is subject to the Boost Software License,
11 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
12 // http://www.boost.org/LICENSE_1_0.txt)
14 #ifndef BOOST_GEOMETRY_STRATEGIES_GEOGRAPHIC_DISTANCE_DETAIL_HPP
15 #define BOOST_GEOMETRY_STRATEGIES_GEOGRAPHIC_DISTANCE_DETAIL_HPP
18 #include <boost/geometry/strategies/geographic/distance.hpp>
19 #include <boost/geometry/strategies/geographic/parameters.hpp>
22 namespace boost { namespace geometry
25 namespace strategy { namespace distance
30 \brief Point-point distance approximation taking flattening into account
32 \tparam Spheroid The reference spheroid model
33 \tparam CalculationType \tparam_calculation
34 \author After Andoyer, 19xx, republished 1950, republished by Meeus, 1999
35 \note Although not so well-known, the approximation is very good: in all cases the results
36 are about the same as Vincenty. In my (Barend's) testcases the results didn't differ more than 6 m
37 \see http://nacc.upc.es/tierra/node16.html
38 \see http://sci.tech-archive.net/Archive/sci.geo.satellite-nav/2004-12/2724.html
39 \see http://home.att.net/~srschmitt/great_circle_route.html (implementation)
40 \see http://www.codeguru.com/Cpp/Cpp/algorithms/article.php/c5115 (implementation)
41 \see http://futureboy.homeip.net/frinksamp/navigation.frink (implementation)
42 \see http://www.voidware.com/earthdist.htm (implementation)
43 \see http://www.dtic.mil/docs/citations/AD0627893
44 \see http://www.dtic.mil/docs/citations/AD703541
48 typename Spheroid = srs::spheroid<double>,
49 typename CalculationType = void
52 : public strategy::distance::geographic
54 strategy::andoyer, Spheroid, CalculationType
57 typedef strategy::distance::geographic
59 strategy::andoyer, Spheroid, CalculationType
67 explicit inline andoyer(Spheroid const& spheroid)
73 #ifndef DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
77 template <typename Spheroid, typename CalculationType>
78 struct tag<andoyer<Spheroid, CalculationType> >
80 typedef strategy_tag_distance_point_point type;
84 template <typename Spheroid, typename CalculationType, typename P1, typename P2>
85 struct return_type<andoyer<Spheroid, CalculationType>, P1, P2>
86 : andoyer<Spheroid, CalculationType>::template calculation_type<P1, P2>
90 template <typename Spheroid, typename CalculationType>
91 struct comparable_type<andoyer<Spheroid, CalculationType> >
93 typedef andoyer<Spheroid, CalculationType> type;
97 template <typename Spheroid, typename CalculationType>
98 struct get_comparable<andoyer<Spheroid, CalculationType> >
100 static inline andoyer<Spheroid, CalculationType> apply(andoyer<Spheroid, CalculationType> const& input)
106 template <typename Spheroid, typename CalculationType, typename P1, typename P2>
107 struct result_from_distance<andoyer<Spheroid, CalculationType>, P1, P2>
109 template <typename T>
110 static inline typename return_type<andoyer<Spheroid, CalculationType>, P1, P2>::type
111 apply(andoyer<Spheroid, CalculationType> const& , T const& value)
118 } // namespace services
119 #endif // DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
122 }} // namespace strategy::distance
125 }} // namespace boost::geometry
128 #endif // BOOST_GEOMETRY_STRATEGIES_GEOGRAPHIC_DISTANCE_DETAIL_HPP