// Copyright (c) 2007-2016 Barend Gehrels, Amsterdam, the Netherlands.
-// This file was modified by Oracle on 2014-2017.
-// Modifications copyright (c) 2014-2017 Oracle and/or its affiliates.
+// This file was modified by Oracle on 2014-2018.
+// Modifications copyright (c) 2014-2018 Oracle and/or its affiliates.
// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
#include <boost/geometry/core/coordinate_type.hpp>
#include <boost/geometry/core/radian_access.hpp>
#include <boost/geometry/core/radius.hpp>
-#include <boost/geometry/core/srs.hpp>
#include <boost/geometry/formulas/andoyer_inverse.hpp>
#include <boost/geometry/formulas/elliptic_arc_length.hpp>
#include <boost/geometry/formulas/flattening.hpp>
+#include <boost/geometry/srs/spheroid.hpp>
+
#include <boost/geometry/strategies/distance.hpp>
#include <boost/geometry/strategies/geographic/parameters.hpp>
#include <boost/geometry/util/promote_floating_point.hpp>
#include <boost/geometry/util/select_calculation_type.hpp>
+#include <boost/geometry/geometries/point_xy.hpp>
namespace boost { namespace geometry
{
namespace strategy { namespace distance
{
+/*!
+\brief Distance calculation for geographic coordinates on a spheroid
+\ingroup strategies
+\tparam FormulaPolicy Formula used to calculate azimuths
+\tparam Spheroid The spheroid model
+\tparam CalculationType \tparam_calculation
+
+\qbk{
+[heading See also]
+\* [link geometry.reference.algorithms.distance.distance_3_with_strategy distance (with strategy)]
+\* [link geometry.reference.srs.srs_spheroid srs::spheroid]
+}
+*/
template
<
typename FormulaPolicy = strategy::andoyer,
return apply(lon1, lat1, lon2, lat2, m_spheroid);
}
+ // points on a meridian not crossing poles
+ template <typename CT>
+ inline CT meridian(CT lat1, CT lat2) const
+ {
+ typedef typename formula::elliptic_arc_length
+ <
+ CT, strategy::default_order<FormulaPolicy>::value
+ > elliptic_arc_length;
+
+ return elliptic_arc_length::meridian_not_crossing_pole_dist(lat1, lat2,
+ m_spheroid);
+ }
+
inline Spheroid const& model() const
{
return m_spheroid;