diff --git a/test/algorithms/buffer/test_buffer.hpp b/test/algorithms/buffer/test_buffer.hpp index d2efb397b..875736796 100644 --- a/test/algorithms/buffer/test_buffer.hpp +++ b/test/algorithms/buffer/test_buffer.hpp @@ -3,8 +3,8 @@ // Copyright (c) 2010-2015 Barend Gehrels, Amsterdam, the Netherlands. -// This file was modified by Oracle on 2016. -// Modifications copyright (c) 2016, Oracle and/or its affiliates. +// This file was modified by Oracle on 2016-2017. +// Modifications copyright (c) 2016-2017, Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Use, modification and distribution is subject to the Boost Software License, @@ -97,8 +97,10 @@ template<> struct EndTestProperties -template -std::size_t count_self_ips(Geometry const& geometry, RescalePolicy const& rescale_policy) +template +std::size_t count_self_ips(Geometry const& geometry, + Strategy const& strategy, + RescalePolicy const& rescale_policy) { typedef typename bg::point_type::type point_type; typedef bg::detail::overlay::turn_info @@ -113,7 +115,7 @@ std::size_t count_self_ips(Geometry const& geometry, RescalePolicy const& rescal bg::self_turns < bg::detail::overlay::assign_null_policy - >(geometry, rescale_policy, turns, policy); + >(geometry, strategy, rescale_policy, turns, policy); return turns.size(); } @@ -217,10 +219,15 @@ void test_buffer(std::string const& caseid, Geometry const& geometry, typedef typename bg::point_type::type point_type; typedef typename bg::rescale_policy_type::type rescale_policy_type; + typedef typename bg::strategy::intersection::services::default_strategy + < + typename bg::cs_tag::type + >::type strategy_type; // Enlarge the box to get a proper rescale policy bg::buffer(envelope, envelope, distance_strategy.max_distance(join_strategy, end_strategy)); + strategy_type strategy; rescale_policy_type rescale_policy = bg::get_rescale_policy(envelope); @@ -233,6 +240,7 @@ void test_buffer(std::string const& caseid, Geometry const& geometry, join_strategy, end_strategy, point_strategy, + strategy, rescale_policy, visitor); @@ -262,6 +270,7 @@ void test_buffer(std::string const& caseid, Geometry const& geometry, bg::model::box envelope_output; bg::assign_values(envelope_output, 0, 0, 1, 1); bg::envelope(buffered, envelope_output); + rescale_policy_type rescale_policy_output = bg::get_rescale_policy(envelope_output); @@ -316,7 +325,7 @@ void test_buffer(std::string const& caseid, Geometry const& geometry, try { bool has_self_ips = bg::detail::overlay::has_self_intersections( - buffered, rescale_policy_output, false); + buffered, strategy, rescale_policy_output, false); // Be sure resulting polygon does not contain // self-intersections BOOST_CHECK_MESSAGE @@ -372,9 +381,9 @@ void test_buffer(std::string const& caseid, Geometry const& geometry, { std::size_t count = 0; if (bg::detail::overlay::has_self_intersections(buffered, - rescale_policy_output, false)) + strategy, rescale_policy_output, false)) { - count = count_self_ips(buffered, rescale_policy_output); + count = count_self_ips(buffered, strategy, rescale_policy_output); } *self_ip_count += count; diff --git a/test/algorithms/detail/partition.cpp b/test/algorithms/detail/partition.cpp index bf50b880f..94bd87114 100644 --- a/test/algorithms/detail/partition.cpp +++ b/test/algorithms/detail/partition.cpp @@ -1,6 +1,11 @@ // Boost.Geometry (aka GGL, Generic Geometry Library) // // Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands. +// +// This file was modified by Oracle on 2017. +// Modifications copyright (c) 2017 Oracle and/or its affiliates. +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle +// // 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) @@ -143,8 +148,8 @@ void test_boxes(std::string const& wkt_box_list, double expected_area, int expec box_visitor visitor; bg::partition < - Box, get_box, ovelaps_box - >::apply(boxes, visitor, 1); + Box + >::apply(boxes, visitor, get_box(), ovelaps_box(), 1); BOOST_CHECK_CLOSE(visitor.area, expected_area, 0.001); BOOST_CHECK_EQUAL(visitor.count, expected_count); @@ -221,8 +226,9 @@ void test_points(std::string const& wkt1, std::string const& wkt2, int expected_ point_visitor visitor; bg::partition < - bg::model::box, get_point, ovelaps_point - >::apply(mp1, mp2, visitor, 1); + bg::model::box + >::apply(mp1, mp2, visitor, get_point(), ovelaps_point(), + get_point(), ovelaps_point(), 1); BOOST_CHECK_EQUAL(visitor.count, expected_count); } @@ -369,12 +375,10 @@ void test_many_points(int seed, int size, int count) bg::partition < bg::model::box, - get_point, ovelaps_point, - get_point, ovelaps_point, bg::detail::partition::include_all_policy, - bg::detail::partition::include_all_policy, - box_visitor_type - >::apply(mp1, mp2, visitor, 2, box_visitor); + bg::detail::partition::include_all_policy + >::apply(mp1, mp2, visitor, get_point(), ovelaps_point(), + get_point(), ovelaps_point(), 2, box_visitor); BOOST_CHECK_EQUAL(visitor.count, expected_count); @@ -479,12 +483,10 @@ void test_many_boxes(int seed, int size, int count) bg::partition < box_type, - get_box, ovelaps_box, - get_box, ovelaps_box, bg::detail::partition::include_all_policy, - bg::detail::partition::include_all_policy, - partition_box_visitor_type - >::apply(boxes, visitor, 2, partition_box_visitor); + bg::detail::partition::include_all_policy + >::apply(boxes, visitor, get_box(), ovelaps_box(), + 2, partition_box_visitor); BOOST_CHECK_EQUAL(visitor.count, expected_count); BOOST_CHECK_CLOSE(visitor.area, expected_area, 0.001); @@ -549,12 +551,10 @@ void test_two_collections(int seed1, int seed2, int size, int count) bg::partition < box_type, - get_box, ovelaps_box, - get_box, ovelaps_box, bg::detail::partition::include_all_policy, - bg::detail::partition::include_all_policy, - partition_box_visitor_type - >::apply(boxes1, boxes2, visitor, 2, partition_box_visitor); + bg::detail::partition::include_all_policy + >::apply(boxes1, boxes2, visitor, get_box(), ovelaps_box(), + get_box(), ovelaps_box(), 2, partition_box_visitor); BOOST_CHECK_EQUAL(visitor.count, expected_count); BOOST_CHECK_CLOSE(visitor.area, expected_area, 0.001); @@ -617,23 +617,19 @@ void test_heterogenuous_collections(int seed1, int seed2, int size, int count) bg::partition < box_type, - get_point, ovelaps_point, - get_box, ovelaps_box, bg::detail::partition::include_all_policy, - bg::detail::partition::include_all_policy, - partition_box_visitor_type - >::apply(points, boxes, visitor1, 2, partition_box_visitor); + bg::detail::partition::include_all_policy + >::apply(points, boxes, visitor1, get_point(), ovelaps_point(), + get_box(), ovelaps_box(), 2, partition_box_visitor); reversed_point_in_box_visitor visitor2; bg::partition < box_type, - get_box, ovelaps_box, - get_point, ovelaps_point, bg::detail::partition::include_all_policy, - bg::detail::partition::include_all_policy, - partition_box_visitor_type - >::apply(boxes, points, visitor2, 2, partition_box_visitor); + bg::detail::partition::include_all_policy + >::apply(boxes, points, visitor2, get_box(), ovelaps_box(), + get_point(), ovelaps_point(), 2, partition_box_visitor); BOOST_CHECK_EQUAL(visitor1.count, expected_count); BOOST_CHECK_EQUAL(visitor2.count, expected_count); diff --git a/test/algorithms/overlay/get_turn_info.cpp b/test/algorithms/overlay/get_turn_info.cpp index 2e94d2a47..e6642afe0 100644 --- a/test/algorithms/overlay/get_turn_info.cpp +++ b/test/algorithms/overlay/get_turn_info.cpp @@ -3,6 +3,10 @@ // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. +// This file was modified by Oracle on 2017. +// Modifications copyright (c) 2017, Oracle and/or its affiliates. +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle + // 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) @@ -42,6 +46,11 @@ void test_with_point(std::string const& caseid, P qj = bg::make

(qj_x, qj_y); P qk = bg::make

(qk_x, qk_y); + typedef typename bg::strategy::intersection::services::default_strategy + < + typename bg::cs_tag

::type + >::type strategy_type; + typedef typename bg::detail::no_rescale_policy rescale_policy_type; typedef bg::detail::overlay::turn_info @@ -52,13 +61,14 @@ void test_with_point(std::string const& caseid, typedef std::vector tp_vector; turn_info model; tp_vector info; + strategy_type strategy; rescale_policy_type rescale_policy; bg::detail::overlay::get_turn_info < bg::detail::overlay::assign_null_policy >::apply(pi, pj, pk, qi, qj, qk, false, false, false, false, // dummy parameters - model, rescale_policy, std::back_inserter(info)); + model, strategy, rescale_policy, std::back_inserter(info)); if (info.size() == 0) diff --git a/test/algorithms/overlay/get_turns.cpp b/test/algorithms/overlay/get_turns.cpp index 4efea8e41..303903bfc 100644 --- a/test/algorithms/overlay/get_turns.cpp +++ b/test/algorithms/overlay/get_turns.cpp @@ -5,6 +5,10 @@ // Copyright (c) 2008-2012 Bruno Lalande, Paris, France. // Copyright (c) 2009-2012 Mateusz Loskot, London, UK. +// This file was modified by Oracle on 2017. +// Modifications copyright (c) 2017, Oracle and/or its affiliates. +// 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. @@ -59,9 +63,17 @@ struct test_get_turns G1 const& g1, G2 const& g2, double /*precision*/) { typedef typename bg::point_type::type point_type; + + typedef typename bg::strategy::intersection::services::default_strategy + < + typename bg::cs_tag::type + >::type strategy_type; + typedef typename bg::rescale_policy_type::type rescale_policy_type; + strategy_type strategy; + rescale_policy_type rescale_policy = bg::get_rescale_policy(g1, g2); @@ -74,7 +86,10 @@ struct test_get_turns bg::detail::get_turns::no_interrupt_policy policy; - bg::get_turns(g1, g2, rescale_policy, turns, policy); + bg::get_turns + < + false, false, bg::detail::overlay::assign_null_policy + >(g1, g2, strategy, rescale_policy, turns, policy); BOOST_CHECK_MESSAGE( expected_count == boost::size(turns), diff --git a/test/algorithms/overlay/overlay.cpp b/test/algorithms/overlay/overlay.cpp index 372e6a7b8..7d979d0b4 100644 --- a/test/algorithms/overlay/overlay.cpp +++ b/test/algorithms/overlay/overlay.cpp @@ -3,6 +3,10 @@ // Copyright (c) 2015 Barend Gehrels, Amsterdam, the Netherlands. +// This file was modified by Oracle on 2017. +// Modifications copyright (c) 2017, Oracle and/or its affiliates. +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle + // 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) @@ -359,6 +363,13 @@ void test_overlay(std::string const& caseid, OverlayType > overlay; + typedef typename bg::strategy::intersection::services::default_strategy + < + typename bg::cs_tag::type + >::type strategy_type; + + strategy_type strategy; + typedef typename bg::rescale_overlay_policy_type < Geometry, @@ -368,15 +379,6 @@ void test_overlay(std::string const& caseid, rescale_policy_type robust_policy = bg::get_rescale_policy(g1, g2); - typedef bg::intersection_strategies - < - typename bg::cs_tag::type, - Geometry, - Geometry, - typename bg::point_type::type, - rescale_policy_type - > strategy; - #if defined(TEST_WITH_SVG) map_visitor visitor(mapper); #else @@ -385,7 +387,7 @@ void test_overlay(std::string const& caseid, Geometry result; overlay::apply(g1, g2, robust_policy, std::back_inserter(result), - strategy(), visitor); + strategy, visitor); BOOST_CHECK_CLOSE(bg::area(result), expected_area, 0.001); BOOST_CHECK_MESSAGE((bg::num_interior_rings(result) == expected_hole_count), diff --git a/test/algorithms/overlay/self_intersection_points.cpp b/test/algorithms/overlay/self_intersection_points.cpp index d6471ff04..bf10e2fae 100644 --- a/test/algorithms/overlay/self_intersection_points.cpp +++ b/test/algorithms/overlay/self_intersection_points.cpp @@ -5,6 +5,10 @@ // Copyright (c) 2008-2012 Bruno Lalande, Paris, France. // Copyright (c) 2009-2012 Mateusz Loskot, London, UK. +// This file was modified by Oracle on 2017. +// Modifications copyright (c) 2017, Oracle and/or its affiliates. +// 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. @@ -51,6 +55,10 @@ static void test_self_intersection_points(std::string const& case_id, { typedef typename bg::point_type::type point_type; //typedef typename bg::rescale_policy_type::type rescale_policy_type; + typedef typename bg::strategy::intersection::services::default_strategy + < + typename bg::cs_tag::type + >::type strategy_type; typedef bg::detail::no_rescale_policy rescale_policy_type; typedef bg::detail::overlay::turn_info < @@ -63,7 +71,7 @@ static void test_self_intersection_points(std::string const& case_id, std::vector turns; - + strategy_type strategy; rescale_policy_type rescale_policy ; // = bg::get_rescale_policy(geometry); @@ -73,7 +81,7 @@ static void test_self_intersection_points(std::string const& case_id, bg::self_turns < bg::detail::overlay::assign_null_policy - >(geometry, rescale_policy, turns, policy); + >(geometry, strategy, rescale_policy, turns, policy); typedef typename bg::coordinate_type::type ct; diff --git a/test/algorithms/overlay/sort_by_side.cpp b/test/algorithms/overlay/sort_by_side.cpp index 9881928b9..1360a8350 100644 --- a/test/algorithms/overlay/sort_by_side.cpp +++ b/test/algorithms/overlay/sort_by_side.cpp @@ -3,6 +3,10 @@ // Copyright (c) 2016 Barend Gehrels, Amsterdam, the Netherlands. +// This file was modified by Oracle on 2017. +// Modifications copyright (c) 2017, Oracle and/or its affiliates. +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle + // 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) @@ -104,7 +108,7 @@ template std::size_t apply_overlay(std::string const& case_id, Geometry1 const& geometry1, Geometry2 const& geometry2, RobustPolicy const& robust_policy, - Strategy const& ) + Strategy const& strategy) { using namespace boost::geometry; @@ -135,7 +139,7 @@ std::size_t apply_overlay(std::string const& case_id, < Reverse1, Reverse2, detail::overlay::assign_null_policy - >(geometry1, geometry2, robust_policy, turns, policy); + >(geometry1, geometry2, strategy, robust_policy, turns, policy); typename Strategy::side_strategy_type side_strategy; cluster_type clusters; @@ -185,18 +189,16 @@ void test_sort_by_side(std::string const& case_id, rescale_policy_type robust_policy = bg::get_rescale_policy(g1, g2); - typedef bg::intersection_strategies - < - typename bg::cs_tag::type, - Geometry, - Geometry, - typename bg::point_type::type, - rescale_policy_type - > strategy; + typedef typename bg::strategy::intersection::services::default_strategy + < + typename bg::cs_tag::type + >::type strategy_type; + + strategy_type strategy; std::size_t open_count = apply_overlay(case_id, g1, g2, robust_policy, - strategy()); + strategy); BOOST_CHECK_MESSAGE(open_count == expected_open_count, " caseid=" << case_id diff --git a/test/algorithms/overlay/test_get_turns.hpp b/test/algorithms/overlay/test_get_turns.hpp index b3db79291..f3c832eb6 100644 --- a/test/algorithms/overlay/test_get_turns.hpp +++ b/test/algorithms/overlay/test_get_turns.hpp @@ -4,8 +4,8 @@ // Copyright (c) 2008-2012 Bruno Lalande, Paris, France. // Copyright (c) 2009-2012 Mateusz Loskot, London, UK. -// This file was modified by Oracle on 2014, 2016. -// Modifications copyright (c) 2014-2016 Oracle and/or its affiliates. +// This file was modified by Oracle on 2014, 2016, 2017. +// Modifications copyright (c) 2014-2017 Oracle and/or its affiliates. // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. @@ -123,10 +123,18 @@ void check_geometry_range(Geometry1 const& g1, std::string const& wkt2, Expected const& expected) { + typedef typename bg::strategy::intersection::services::default_strategy + < + typename bg::cs_tag::type + >::type strategy_type; + typedef bg::detail::no_rescale_policy robust_policy_type; typedef typename bg::point_type::type point_type; - typedef typename bg::segment_ratio_type::type segment_ratio_type; + typedef typename bg::segment_ratio_type + < + point_type, robust_policy_type + >::type segment_ratio_type; typedef bg::detail::overlay::turn_info < @@ -144,16 +152,21 @@ void check_geometry_range(Geometry1 const& g1, std::vector turns; interrupt_policy_t interrupt_policy; + strategy_type strategy; robust_policy_type robust_policy; // Don't switch the geometries - typedef bg::detail::get_turns::get_turn_info_type turn_policy_t; + typedef bg::detail::get_turns::get_turn_info_type + < + Geometry1, Geometry2, assign_policy_t + > turn_policy_t; + bg::dispatch::get_turns < typename bg::tag::type, typename bg::tag::type, Geometry1, Geometry2, false, false, turn_policy_t - >::apply(0, g1, 1, g2, robust_policy, turns, interrupt_policy); + >::apply(0, g1, 1, g2, strategy, robust_policy, turns, interrupt_policy); bool ok = boost::size(expected) == turns.size(); diff --git a/test/algorithms/relational_operations/covered_by/test_covered_by.hpp b/test/algorithms/relational_operations/covered_by/test_covered_by.hpp index 5403e8edb..09e61d2e7 100644 --- a/test/algorithms/relational_operations/covered_by/test_covered_by.hpp +++ b/test/algorithms/relational_operations/covered_by/test_covered_by.hpp @@ -4,6 +4,11 @@ // Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands. // Copyright (c) 2013-2015 Adam Wulkiewicz, Lodz, Poland. +// This file was modified by Oracle on 2017. +// Modifications copyright (c) 2017 Oracle and/or its affiliates. + +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle + // 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) @@ -17,14 +22,13 @@ #include -#include #include -#include +#include #include #include #include - #include +#include template void check_geometry(Geometry1 const& geometry1, diff --git a/test/algorithms/relational_operations/within/test_within.hpp b/test/algorithms/relational_operations/within/test_within.hpp index b92b029dd..049a99556 100644 --- a/test/algorithms/relational_operations/within/test_within.hpp +++ b/test/algorithms/relational_operations/within/test_within.hpp @@ -4,15 +4,15 @@ // Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands. // Copyright (c) 2013-2015 Adam Wulkiewicz, Lodz, Poland. -// This file was modified by Oracle on 2014, 2015. -// Modifications copyright (c) 2014-2015 Oracle and/or its affiliates. +// This file was modified by Oracle on 2014, 2015, 2017. +// Modifications copyright (c) 2014-2017 Oracle and/or its affiliates. + +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // 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) -// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle - #ifndef BOOST_GEOMETRY_TEST_WITHIN_HPP #define BOOST_GEOMETRY_TEST_WITHIN_HPP @@ -21,23 +21,13 @@ #include +#include #include - -#include #include #include #include - #include - -#include -#include -#include -#include -#include -#include - -#include +#include template void check_geometry(Geometry1 const& geometry1, diff --git a/test/algorithms/set_operations/check_turn_less.hpp b/test/algorithms/set_operations/check_turn_less.hpp index c786c34f0..980862810 100644 --- a/test/algorithms/set_operations/check_turn_less.hpp +++ b/test/algorithms/set_operations/check_turn_less.hpp @@ -72,6 +72,11 @@ struct check_turn_less static inline void apply(Geometry1 const& geometry1, Geometry2 const& geometry2) { + typedef typename bg::strategy::intersection::services::default_strategy + < + typename bg::cs_tag::type + >::type strategy_type; + typedef bg::detail::no_rescale_policy robust_policy_type; typedef bg::detail::relate::turns::get_turns @@ -94,7 +99,8 @@ struct check_turn_less bg::detail::get_turns::no_interrupt_policy interrupt_policy; get_turns_type::apply(turns, geometry1, geometry2, - interrupt_policy, robust_policy_type()); + interrupt_policy, + strategy_type(), robust_policy_type()); typedef bg::detail::turns::less_seg_fraction_other_op<> turn_less_type; diff --git a/test/algorithms/set_operations/intersection/test_intersection.hpp b/test/algorithms/set_operations/intersection/test_intersection.hpp index adface270..58b0d6f28 100644 --- a/test/algorithms/set_operations/intersection/test_intersection.hpp +++ b/test/algorithms/set_operations/intersection/test_intersection.hpp @@ -175,17 +175,12 @@ typename bg::default_area_result::type test_intersection(std::string const& if (! settings.debug) { // Check _inserter behaviour with stratey - typedef bg::intersection_strategies + typedef typename bg::strategy::intersection::services::default_strategy < - typename bg::cs_tag::type, - G1, - G2, - point_type, - typename bg::rescale_policy_type::type, - CalculationType - > strategy; + typename bg::cs_tag::type + >::type strategy_type; result_type clip; - bg::detail::intersection::intersection_insert(g1, g2, std::back_inserter(clip), strategy()); + bg::detail::intersection::intersection_insert(g1, g2, std::back_inserter(clip), strategy_type()); } typename bg::default_area_result::type length_or_area = 0; diff --git a/test/io/svg/svg.cpp b/test/io/svg/svg.cpp index 54c02d73a..10e8b4fee 100644 --- a/test/io/svg/svg.cpp +++ b/test/io/svg/svg.cpp @@ -1,7 +1,7 @@ // Boost.Geometry // Unit Test -// Copyright (c) 2016 Oracle and/or its affiliates. +// Copyright (c) 2016-2017 Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -29,7 +29,8 @@ #include #include -#include +#include + template inline void push_back_square(R & rng, T const& mi, T const& ma) diff --git a/test/iterators/point_iterator.cpp b/test/iterators/point_iterator.cpp index 8c2cba036..6a08c9dfe 100644 --- a/test/iterators/point_iterator.cpp +++ b/test/iterators/point_iterator.cpp @@ -1,7 +1,7 @@ // Boost.Geometry (aka GGL, Generic Geometry Library) // Unit Test -// Copyright (c) 2014-2016, Oracle and/or its affiliates. +// Copyright (c) 2014-2017, 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 @@ -52,9 +52,12 @@ #include #include +#include + #include #include + namespace bg = ::boost::geometry; namespace ba = ::boost::assign; diff --git a/test/strategies/segment_intersection_collinear.cpp b/test/strategies/segment_intersection_collinear.cpp index 620b0036d..f3611d800 100644 --- a/test/strategies/segment_intersection_collinear.cpp +++ b/test/strategies/segment_intersection_collinear.cpp @@ -5,6 +5,9 @@ // Copyright (c) 2008-2012 Bruno Lalande, Paris, France. // Copyright (c) 2009-2012 Mateusz Loskot, London, UK. +// Copyright (c) 2017, Oracle and/or its affiliates. +// 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. @@ -85,19 +88,21 @@ static void test_segment_intersection(std::string const& case_id, >::type > result_type; + typedef bg::policies::relate::segments_intersection_points + < + result_type + > points_policy_type; + // Get the intersection point (or two points) result_type is - = bg::strategy::intersection::relate_cartesian_segments - < - bg::policies::relate::segments_intersection_points - >::apply(s12, s34, rescale_policy, p1, p2, p3, p4); + = bg::strategy::intersection::relate_cartesian_segments<> + ::apply(s12, s34, points_policy_type(), rescale_policy, p1, p2, p3, p4); // Get just a character for Left/Right/intersects/etc, purpose is more for debugging bg::policies::relate::direction_type dir - = bg::strategy::intersection::relate_cartesian_segments - < - bg::policies::relate::segments_direction - >::apply(s12, s34, rescale_policy, p1, p2, p3, p4); + = bg::strategy::intersection::relate_cartesian_segments<> + ::apply(s12, s34, bg::policies::relate::segments_direction(), + rescale_policy, p1, p2, p3, p4); std::size_t expected_count = check(is, 0, expected_x1, expected_y1) @@ -143,12 +148,15 @@ static void test_segment_ratio(std::string const& case_id, ratio_type > result_type; + typedef bg::policies::relate::segments_intersection_points + < + result_type + > points_policy_type; + // Get the intersection point (or two points) result_type is - = bg::strategy::intersection::relate_cartesian_segments - < - bg::policies::relate::segments_intersection_points - >::apply(s12, s34, rescale_policy, p1, p2, p3, p4); + = bg::strategy::intersection::relate_cartesian_segments<> + ::apply(s12, s34, points_policy_type(), rescale_policy, p1, p2, p3, p4); ratio_type expected_a1(expected_pair_a1.first, expected_pair_a1.second); ratio_type expected_a2(expected_pair_a2.first, expected_pair_a2.second); diff --git a/test/strategies/segment_intersection_sph.cpp b/test/strategies/segment_intersection_sph.cpp index ae94e1e22..7073696fd 100644 --- a/test/strategies/segment_intersection_sph.cpp +++ b/test/strategies/segment_intersection_sph.cpp @@ -1,7 +1,7 @@ // Boost.Geometry // Unit Test -// Copyright (c) 2016, Oracle and/or its affiliates. +// Copyright (c) 2016-2017, Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Use, modification and distribution is subject to the Boost Software License, @@ -57,14 +57,11 @@ void test_spherical_strategy_one(S1 const& s1, S2 const& s2, char m, std::size_t >, bg::policies::relate::segments_direction > policy_t; - typedef bg::strategy::intersection::relate_spherical_segments - < - policy_t - > strategy_t; - typedef typename strategy_t::return_type return_type; + typedef bg::strategy::intersection::relate_spherical_segments<> strategy_t; + typedef typename policy_t::return_type return_type; // NOTE: robust policy is currently ignored - return_type res = strategy_t::apply(s1, s2, 0); + return_type res = strategy_t::apply(s1, s2, policy_t(), 0); size_t const res_count = boost::get<0>(res).count; char const res_method = boost::get<1>(res).how;