]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/geometry/algorithms/detail/is_valid/has_valid_self_turns.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / geometry / algorithms / detail / is_valid / has_valid_self_turns.hpp
index b36e9f38b75b59cc6710f13acf2bb7b63f6c8d37..e99e41133b6a5be5ca696449151c7fd00c1e6ec2 100644 (file)
@@ -1,6 +1,6 @@
 // Boost.Geometry (aka GGL, Generic Geometry Library)
 
-// Copyright (c) 2014-2017, Oracle and/or its affiliates.
+// Copyright (c) 2014-2019, Oracle and/or its affiliates.
 
 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
 #include <boost/core/ignore_unused.hpp>
 #include <boost/range.hpp>
 
+#include <boost/geometry/algorithms/detail/is_valid/is_acceptable_turn.hpp>
+#include <boost/geometry/algorithms/detail/overlay/get_turn_info.hpp>
+#include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>
+#include <boost/geometry/algorithms/detail/overlay/self_turn_points.hpp>
+#include <boost/geometry/algorithms/validity_failure_type.hpp>
+
 #include <boost/geometry/core/assert.hpp>
 #include <boost/geometry/core/point_type.hpp>
 
 #include <boost/geometry/policies/robustness/segment_ratio_type.hpp>
 #include <boost/geometry/policies/robustness/get_rescale_policy.hpp>
 
-#include <boost/geometry/algorithms/detail/overlay/get_turn_info.hpp>
-#include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>
-#include <boost/geometry/algorithms/detail/overlay/self_turn_points.hpp>
-
-#include <boost/geometry/algorithms/detail/is_valid/is_acceptable_turn.hpp>
-
 namespace boost { namespace geometry
 {
 
@@ -41,7 +41,7 @@ namespace detail { namespace is_valid
 template
 <
     typename Geometry,
-    typename IsAcceptableTurn = is_acceptable_turn<Geometry>
+    typename CSTag
 >
 class has_valid_self_turns
 {
@@ -50,7 +50,8 @@ private:
 
     typedef typename geometry::rescale_policy_type
         <
-            point_type
+            point_type,
+            CSTag
         >::type rescale_policy_type;
 
     typedef detail::overlay::get_turn_info
@@ -62,7 +63,7 @@ public:
     typedef detail::overlay::turn_info
         <
             point_type,
-            typename geometry::segment_ratio_type
+            typename segment_ratio_type
                 <
                     point_type,
                     rescale_policy_type
@@ -79,18 +80,20 @@ public:
         boost::ignore_unused(visitor);
 
         rescale_policy_type robust_policy
-            = geometry::get_rescale_policy<rescale_policy_type>(geometry);
+            = geometry::get_rescale_policy<rescale_policy_type>(geometry, strategy);
 
         detail::overlay::stateless_predicate_based_interrupt_policy
             <
-                IsAcceptableTurn
+                is_acceptable_turn<Geometry>
             > interrupt_policy;
 
+        // Calculate self-turns, skipping adjacent segments
         detail::self_get_turn_points::self_turns<false, turn_policy>(geometry,
                                           strategy,
                                           robust_policy,
                                           turns,
-                                          interrupt_policy);
+                                          interrupt_policy,
+                                          0, true);
 
         if (interrupt_policy.has_intersections)
         {