]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/geometry/algorithms/detail/distance/point_to_geometry.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / geometry / algorithms / detail / distance / point_to_geometry.hpp
index 9596799cb2768478bb453e2262baa81061159af1..177eb19f1f09ac72a528479017b5481c0790505b 100644 (file)
@@ -5,10 +5,11 @@
 // Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
 // Copyright (c) 2013-2014 Adam Wulkiewicz, Lodz, Poland.
 
-// This file was modified by Oracle on 2014.
-// Modifications copyright (c) 2014, Oracle and/or its affiliates.
+// This file was modified by Oracle on 2014, 2019.
+// Modifications 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
 
 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
 #include <boost/geometry/strategies/tags.hpp>
 
 #include <boost/geometry/algorithms/assign.hpp>
-#include <boost/geometry/algorithms/covered_by.hpp>
-#include <boost/geometry/algorithms/within.hpp>
 
 #include <boost/geometry/algorithms/detail/closest_feature/geometry_to_range.hpp>
 #include <boost/geometry/algorithms/detail/closest_feature/point_to_range.hpp>
 #include <boost/geometry/algorithms/detail/distance/is_comparable.hpp>
 #include <boost/geometry/algorithms/detail/distance/iterator_selector.hpp>
+#include <boost/geometry/algorithms/detail/within/point_in_geometry.hpp>
 
 #include <boost/geometry/algorithms/dispatch/distance.hpp>
 
@@ -160,7 +160,9 @@ struct point_to_ring
                                     Ring const& ring,
                                     Strategy const& strategy)
     {
-        if (geometry::within(point, ring))
+        // TODO: pass strategy
+        if (within::within_point_geometry(point, ring,
+                                          strategy.get_point_in_geometry_strategy()))
         {
             return return_type(0);
         }
@@ -204,7 +206,9 @@ private:
         {
             for (InteriorRingIterator it = first; it != last; ++it)
             {
-                if (geometry::within(point, *it))
+                // TODO: pass strategy
+                if (within::within_point_geometry(point, *it,
+                                                  strategy.get_point_in_geometry_strategy()))
                 {
                     // the point is inside a polygon hole, so its distance
                     // to the polygon its distance to the polygon's
@@ -233,7 +237,9 @@ public:
                                     Polygon const& polygon,
                                     Strategy const& strategy)
     {
-        if (!geometry::covered_by(point, exterior_ring(polygon)))
+        // TODO: pass strategy
+        if (! within::covered_by_point_geometry(point, exterior_ring(polygon),
+                                                strategy.get_point_in_geometry_strategy()))
         {
             // the point is outside the exterior ring, so its distance
             // to the polygon is its distance to the polygon's exterior ring
@@ -330,7 +336,9 @@ struct point_to_multigeometry<Point, MultiPolygon, Strategy, true>
                                     MultiPolygon const& multipolygon,
                                     Strategy const& strategy)
     {
-        if (geometry::covered_by(point, multipolygon))
+        // TODO: pass strategy
+        if (within::covered_by_point_geometry(point, multipolygon,
+                                              strategy.get_point_in_geometry_strategy()))
         {
             return 0;
         }