diff --git a/include/boost/geometry/algorithms/detail/overlay/less_by_segment_ratio.hpp b/include/boost/geometry/algorithms/detail/overlay/less_by_segment_ratio.hpp index 76542488a..ae88d18bd 100644 --- a/include/boost/geometry/algorithms/detail/overlay/less_by_segment_ratio.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/less_by_segment_ratio.hpp @@ -238,7 +238,7 @@ private : // Check if one union option (of left hand side) is located // left (spatially left) of the other union option (of right hand side) - int const side = strategy::apply(p_both2, p_lhs, p_rhs); + int const side = strategy::apply(left_turn.point, p_lhs, p_rhs); if (side == 0) { return false; diff --git a/test/algorithms/overlay/multi_overlay_cases.hpp b/test/algorithms/overlay/multi_overlay_cases.hpp index e2c781fbb..4eea0b5f4 100644 --- a/test/algorithms/overlay/multi_overlay_cases.hpp +++ b/test/algorithms/overlay/multi_overlay_cases.hpp @@ -420,6 +420,12 @@ static std::string case_recursive_boxes_7[2] = "MULTIPOLYGON(((0 0,1 1,1 0,0 0)),((0 1,0 2,1 2,0 1)),((3.5 2.5,4 3,4 2,3 2,3 3,3.5 2.5)),((3 2,4 1,1 1,1 2,3 2)))" }; +static std::string case_recursive_boxes_8[2] = +{ + "MULTIPOLYGON(((3 4,3 3,2 3,2 2,0 2,0 3,1 3,1 4,1.5 3.5,2 4,3 4)),((2 5,2 4,1 4,0 3,0 5,2 5)))", + "MULTIPOLYGON(((3 4,4 4,4 3,3 3,3 1,0 1,0 2,1 2,1 3,0 2,0 4,3 4)))" +}; + static std::string pie_21_7_21_0_3[2] = { diff --git a/test/algorithms/set_operations/intersection/intersection_multi.cpp b/test/algorithms/set_operations/intersection/intersection_multi.cpp index 680b326e9..f75f165d1 100644 --- a/test/algorithms/set_operations/intersection/intersection_multi.cpp +++ b/test/algorithms/set_operations/intersection/intersection_multi.cpp @@ -150,6 +150,10 @@ void test_areal() case_recursive_boxes_7[0], case_recursive_boxes_7[1], 2, 9, 1.5); + test_one("case_recursive_boxes_8", + case_recursive_boxes_8[0], case_recursive_boxes_8[1], + 3, 19, 3.75); + test_one("ggl_list_20120915_h2_a", ggl_list_20120915_h2[0], ggl_list_20120915_h2[1], 2, 10, 6.0); // Area from SQL Server diff --git a/test/algorithms/set_operations/union/union_multi.cpp b/test/algorithms/set_operations/union/union_multi.cpp index 1d956286d..20324ee5c 100644 --- a/test/algorithms/set_operations/union/union_multi.cpp +++ b/test/algorithms/set_operations/union/union_multi.cpp @@ -136,6 +136,10 @@ void test_areal() case_recursive_boxes_7[0], case_recursive_boxes_7[1], 2, 0, 20, 7.0); + test_one("case_recursive_boxes_8", + case_recursive_boxes_8[0], case_recursive_boxes_8[1], + 1, 0, 13, 12.0); + test_one("ggl_list_20120915_h2_a", ggl_list_20120915_h2[0], ggl_list_20120915_h2[1], 1, 0, 12, 23.0); // Area from SQL Server