]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/geometry/algorithms/detail/equals/collect_vectors.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / geometry / algorithms / detail / equals / collect_vectors.hpp
index 9625f184264d2a532ac1b7e5c7f315fcfbeec645..fd5c3caa4269e08eb390f36ef26d17c3773246de 100644 (file)
@@ -5,8 +5,8 @@
 // Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
 // Copyright (c) 2014-2017 Adam Wulkiewicz, Lodz, Poland.
 
-// This file was modified by Oracle on 2017.
-// Modifications copyright (c) 2017 Oracle and/or its affiliates.
+// This file was modified by Oracle on 2017, 2019.
+// Modifications copyright (c) 2017, 2019 Oracle and/or its affiliates.
 
 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
 
 
 #include <boost/geometry/strategies/cartesian/side_by_triangle.hpp>
 #include <boost/geometry/strategies/spherical/ssf.hpp>
+#include <boost/geometry/strategies/normalize.hpp>
 
 
 namespace boost { namespace geometry
 {
 
-// TODO: dispatch only by SideStrategy instead of Geometry/CSTag?
-
 // Since these vectors (though ray would be a better name) are used in the
 // implementation of equals() for Areal geometries the internal representation
 // should be consistent with the side strategy.
@@ -159,7 +158,8 @@ private:
 };
 
 // Compatible with spherical_side_formula which currently
-// is the default spherical and geographical strategy
+// is the default spherical_equatorial and geographic strategy
+// so CSTag is spherical_equatorial_tag or geographic_tag
 template <typename T, typename Geometry, typename CT, typename CSTag>
 struct collected_vector
     <
@@ -168,8 +168,8 @@ struct collected_vector
 {
     typedef T type;
     
-    typedef typename coordinate_system<Geometry>::type cs_type;
-    typedef model::point<T, 2, cs_type> point_type;
+    typedef typename geometry::detail::cs_angular_units<Geometry>::type units_type;
+    typedef model::point<T, 2, cs::spherical_equatorial<units_type> > point_type;
     typedef model::point<T, 3, cs::cartesian> vector_type;
 
     collected_vector()
@@ -179,7 +179,9 @@ struct collected_vector
     collected_vector(Point const& p1, Point const& p2)
         : origin(get<0>(p1), get<1>(p1))
     {
-        origin = detail::return_normalized<point_type>(origin);
+        origin = detail::return_normalized<point_type>(
+                    origin,
+                    strategy::normalize::spherical_point());
 
         using namespace geometry::formula;
         prev = sph_to_cart3d<vector_type>(p1);
@@ -290,7 +292,7 @@ struct collected_vector
 
 private:
     template <typename Point>
-    Point polar_to_equatorial(Point const& p)
+    Point to_equatorial(Point const& p)
     {
         typedef typename coordinate_type<Point>::type coord_type;
 
@@ -309,6 +311,9 @@ private:
 };
 
 
+// TODO: specialize collected_vector for geographic_tag
+
+
 #ifndef DOXYGEN_NO_DETAIL
 namespace detail { namespace collect_vectors
 {