From 62f43a5c03b67acdf309aaa52df62a322e0d976f Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Wed, 27 May 2015 14:04:46 +0200 Subject: [PATCH 1/4] [relate][strategies] Pass StaticMask as function parameter. --- include/boost/geometry/strategies/agnostic/relate.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/geometry/strategies/agnostic/relate.hpp b/include/boost/geometry/strategies/agnostic/relate.hpp index 0d59d1d86..676207694 100644 --- a/include/boost/geometry/strategies/agnostic/relate.hpp +++ b/include/boost/geometry/strategies/agnostic/relate.hpp @@ -25,7 +25,7 @@ struct relate { static inline bool apply(Geometry1 const& geometry1, Geometry2 const& geometry2) { - return geometry::relate(geometry1, geometry2); + return geometry::relate(geometry1, geometry2, StaticMask()); } }; From abdf2a2255722036417e42a8605a37b95924a079 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Wed, 27 May 2015 14:56:22 +0200 Subject: [PATCH 2/4] [test][iterators] Add missing include (for make_zero). --- test/iterators/point_iterator.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/test/iterators/point_iterator.cpp b/test/iterators/point_iterator.cpp index 59d2266cb..d3c65e140 100644 --- a/test/iterators/point_iterator.cpp +++ b/test/iterators/point_iterator.cpp @@ -35,6 +35,7 @@ #include #include +#include #include #include From 70acee4e33044c7729b824edf8a147ce8e079d43 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Wed, 27 May 2015 15:11:28 +0200 Subject: [PATCH 3/4] [test][strategies] Remove unneeded includes - obsolete de9im intersection policy. --- test/strategies/segment_intersection.cpp | 1 - test/strategies/segment_intersection_collinear.cpp | 1 - 2 files changed, 2 deletions(-) diff --git a/test/strategies/segment_intersection.cpp b/test/strategies/segment_intersection.cpp index fdd66eeb9..baa947b26 100644 --- a/test/strategies/segment_intersection.cpp +++ b/test/strategies/segment_intersection.cpp @@ -30,7 +30,6 @@ #include #include -//#include #include #include diff --git a/test/strategies/segment_intersection_collinear.cpp b/test/strategies/segment_intersection_collinear.cpp index 8c25d5fe6..620b0036d 100644 --- a/test/strategies/segment_intersection_collinear.cpp +++ b/test/strategies/segment_intersection_collinear.cpp @@ -23,7 +23,6 @@ #include #include -#include #include #include From 8730f3741e61dfd02a51c31c1ee83fc482e717bb Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Wed, 27 May 2015 15:12:14 +0200 Subject: [PATCH 4/4] [policies] Remove obsolete de9im intersection policy. --- .../boost/geometry/policies/relate/de9im.hpp | 168 ------------------ 1 file changed, 168 deletions(-) delete mode 100644 include/boost/geometry/policies/relate/de9im.hpp diff --git a/include/boost/geometry/policies/relate/de9im.hpp b/include/boost/geometry/policies/relate/de9im.hpp deleted file mode 100644 index e2d6b5111..000000000 --- a/include/boost/geometry/policies/relate/de9im.hpp +++ /dev/null @@ -1,168 +0,0 @@ -// Boost.Geometry (aka GGL, Generic Geometry Library) - -// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. - -// Use, modification and distribution is subject to the Boost Software License, -// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_GEOMETRY_GEOMETRY_POLICIES_RELATE_DE9IM_HPP -#define BOOST_GEOMETRY_GEOMETRY_POLICIES_RELATE_DE9IM_HPP - - -#include -#include -#include - - -namespace boost { namespace geometry -{ - -namespace policies { namespace relate -{ - - -template -struct segments_de9im -{ - typedef de9im_segment return_type; - typedef S1 segment_type1; - typedef S2 segment_type2; - typedef typename select_coordinate_type::type coordinate_type; - - static inline return_type rays_intersect(bool on_segment, - double ra, double rb, - coordinate_type const& dx1, coordinate_type const& dy1, - coordinate_type const& dx2, coordinate_type const& dy2, - coordinate_type const& wx, coordinate_type const& wy, - S1 const& s1, S2 const& s2) - { - if(on_segment) - { - // 0 <= ra <= 1 and 0 <= rb <= 1 - // Now check if one of them is 0 or 1, these are "touch" cases - bool a = math::equals(ra, 0.0) || math::equals(ra, 1.0); - bool b = math::equals(rb, 0.0) || math::equals(rb, 1.0); - if (a && b) - { - // Touch boundary/boundary: i-i == -1, i-b == -1, b-b == 0 - // Opposite: if both are equal they touch in opposite direction - return de9im_segment(ra,rb, - -1, -1, 1, - -1, 0, 0, - 1, 0, 2, false, math::equals(ra,rb)); - } - else if (a || b) - { - // Touch boundary/interior: i-i == -1, i-b == -1 or 0, b-b == -1 - int A = a ? 0 : -1; - int B = b ? 0 : -1; - return de9im_segment(ra,rb, - -1, B, 1, - A, -1, 0, - 1, 0, 2); - } - - // Intersects: i-i == 0, i-b == -1, i-e == 1 - return de9im_segment(ra,rb, - 0, -1, 1, - -1, -1, 0, - 1, 0, 2); - } - - // Not on segment, disjoint - return de9im_segment(ra,rb, - -1, -1, 1, - -1, -1, 0, - 1, 0, 2); - } - - static inline return_type collinear_touch(coordinate_type const& x, - coordinate_type const& y, bool opposite, char) - { - return de9im_segment(0,0, - -1, -1, 1, - -1, 0, 0, - 1, 0, 2, - true, opposite); - } - - template - static inline return_type collinear_interior_boundary_intersect(S const& s, - bool a_within_b, bool opposite) - { - return a_within_b - ? de9im_segment(0,0, - 1, -1, -1, - 0, 0, -1, - 1, 0, 2, - true, opposite) - : de9im_segment(0,0, - 1, 0, 1, - -1, 0, 0, - -1, -1, 2, - true, opposite); - } - - - - static inline return_type collinear_a_in_b(S1 const& s, bool opposite) - { - return de9im_segment(0,0, - 1, -1, -1, - 0, -1, -1, - 1, 0, 2, - true, opposite); - } - static inline return_type collinear_b_in_a(S2 const& s, bool opposite) - { - return de9im_segment(0,0, - 1, 0, 1, - -1, -1, 0, - -1, -1, 2, - true, opposite); - } - - static inline return_type collinear_overlaps( - coordinate_type const& x1, coordinate_type const& y1, - coordinate_type const& x2, coordinate_type const& y2, bool opposite) - { - return de9im_segment(0,0, - 1, 0, 1, - 0, -1, 0, - 1, 0, 2, - true, opposite); - } - - static inline return_type segment_equal(S1 const& s, bool opposite) - { - return de9im_segment(0,0, - 1, -1, -1, - -1, 0, -1, - -1, -1, 2, - true, opposite); - } - - static inline return_type degenerate(S1 const& segment, bool a_degenerate) - { - return a_degenerate - ? de9im_segment(0,0, - 0, -1, -1, - -1, -1, -1, - 1, 0, 2, - false, false, false, true) - : de9im_segment(0,0, - 0, -1, 1, - -1, -1, 0, - -1, -1, 2, - false, false, false, true); - } - -}; - - -}} // namespace policies::relate - -}} // namespace boost::geometry - -#endif // BOOST_GEOMETRY_GEOMETRY_POLICIES_RELATE_DE9IM_HPP