// Copyright (c) 2009-2016 Mateusz Loskot, London, UK.
// This file was modified by Oracle on 2014-2017.
-// Modifications copyright (c) 2014-2016 Oracle and/or its affiliates.
+// Modifications copyright (c) 2014-2017 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/concept_check.hpp>
+#include <boost/geometry/algorithms/assign.hpp>
+#include <boost/geometry/algorithms/distance.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/srs/spheroid.hpp>
+#include <boost/geometry/strategies/concepts/distance_concept.hpp>
#include <boost/geometry/strategies/geographic/distance_andoyer.hpp>
#include <boost/geometry/strategies/geographic/side_andoyer.hpp>
-#include <boost/geometry/core/srs.hpp>
-#include <boost/geometry/strategies/strategies.hpp>
-#include <boost/geometry/algorithms/assign.hpp>
-#include <boost/geometry/geometries/point.hpp>
#include <test_common/test_point.hpp>
#ifdef HAVE_TTMATH
typedef bg::srs::spheroid<rtype> stype;
typedef bg::strategy::distance::andoyer<stype> andoyer_type;
+ typedef bg::strategy::distance::geographic<bg::strategy::andoyer, stype> geographic_type;
typedef bg::formula::andoyer_inverse<rtype, true, false> andoyer_inverse_type;
BOOST_CONCEPT_ASSERT
);
andoyer_type andoyer;
+ geographic_type geographic;
typedef typename bg::strategy::distance
::services::return_type<andoyer_type, P1, P2>::type return_type;
bg::assign_values(p2, lon2, lat2);
return_type d_strategy = andoyer.apply(p1, p2);
+ return_type d_strategy2 = geographic.apply(p1, p2);
return_type d_function = bg::distance(p1, p2, andoyer);
double diff = bg::math::longitude_distance_signed<bg::degree>(lon1, lon2);
}
BOOST_CHECK_CLOSE(d_strategy / 1000.0, expected_km, 0.001);
+ BOOST_CHECK_CLOSE(d_strategy2 / 1000.0, expected_km, 0.001);
BOOST_CHECK_CLOSE(d_function / 1000.0, expected_km, 0.001);
BOOST_CHECK_CLOSE(d_formula / 1000.0, expected_km, 0.001);
}
typedef bg::srs::spheroid<rtype> stype;
typedef bg::strategy::side::andoyer<stype> strategy_type;
+ typedef bg::strategy::side::geographic<bg::strategy::andoyer, stype> strategy2_type;
strategy_type strategy;
+ strategy2_type strategy2;
PS p1, p2;
P p;
bg::assign_values(p, lon, lat);
int side = strategy.apply(p1, p2, p);
+ int side2 = strategy2.apply(p1, p2, p);
BOOST_CHECK_EQUAL(side, expected_side);
+ BOOST_CHECK_EQUAL(side2, expected_side);
}
template <typename P1, typename P2>