From 20c0388e6e6e990d61dc5824c4ed87149688ad9a Mon Sep 17 00:00:00 2001 From: Vissarion Fisikopoulos Date: Mon, 27 May 2024 14:35:23 +0300 Subject: [PATCH] Remove the rest of rescaling code --- ...5_b_overlay_linestring_polygon_example.cpp | 3 +- example/c05_custom_point_pointer_example.cpp | 3 +- .../detail/disjoint/linear_linear.hpp | 1 - .../detail/intersects/implementation.hpp | 1 - .../algorithms/detail/is_simple/linear.hpp | 1 - .../detail/overlay/get_clusters.hpp | 6 +- .../overlay/get_intersection_points.hpp | 1 - .../detail/overlay/get_turn_info.hpp | 10 +-- .../overlay/get_turn_info_for_endpoint.hpp | 1 - .../detail/overlay/get_turn_info_helpers.hpp | 1 - .../detail/overlay/intersection_insert.hpp | 2 - .../detail/overlay/self_turn_points.hpp | 2 - .../detail/touches/implementation.hpp | 2 - .../policies/robustness/no_rescale_policy.hpp | 45 ------------ .../policies/robustness/rescale_policy.hpp | 73 ------------------- .../robustness/rescale_policy_tags.hpp | 43 ----------- .../strategies/cartesian/intersection.hpp | 20 +++-- .../strategies/geographic/intersection.hpp | 8 +- .../strategies/intersection_result.hpp | 12 +-- .../strategies/intersection_strategies.hpp | 8 -- .../strategies/spherical/intersection.hpp | 8 +- .../buffer/buffer_variable_width.cpp | 1 - test/algorithms/is_valid.cpp | 11 +-- .../segment_intersection_collinear.cpp | 8 +- test/strategies/segment_intersection_sph.hpp | 8 +- 25 files changed, 42 insertions(+), 237 deletions(-) delete mode 100644 include/boost/geometry/policies/robustness/no_rescale_policy.hpp delete mode 100644 include/boost/geometry/policies/robustness/rescale_policy.hpp delete mode 100644 include/boost/geometry/policies/robustness/rescale_policy_tags.hpp diff --git a/example/05_b_overlay_linestring_polygon_example.cpp b/example/05_b_overlay_linestring_polygon_example.cpp index dcde8ff81d..4fc29f42d5 100644 --- a/example/05_b_overlay_linestring_polygon_example.cpp +++ b/example/05_b_overlay_linestring_polygon_example.cpp @@ -68,9 +68,8 @@ int main(void) using turn_info = bg::detail::overlay::turn_info; std::vector turns; bg::detail::get_turns::no_interrupt_policy policy; - bg::detail::no_rescale_policy rescale_policy; bg::strategies::relate::services::default_strategy, bg::model::polygon>::type strategy; - bg::get_turns(ls, p, strategy, rescale_policy, turns, policy); + bg::get_turns(ls, p, strategy, turns, policy); std::cout << "Intersection of linestring/polygon" << std::endl; for (turn_info const& turn : turns) diff --git a/example/c05_custom_point_pointer_example.cpp b/example/c05_custom_point_pointer_example.cpp index a1d9dbef02..d8059fe04d 100644 --- a/example/c05_custom_point_pointer_example.cpp +++ b/example/c05_custom_point_pointer_example.cpp @@ -102,11 +102,10 @@ int main() // This works because outputs to a normal struct point, no point* typedef boost::geometry::model::linestring linestring_2d; - boost::geometry::detail::no_rescale_policy rescale_policy; std::vector clipped; boost::geometry::strategy::intersection::liang_barsky strategy; boost::geometry::detail::intersection::clip_range_with_box(cb, - myline, rescale_policy, std::back_inserter(clipped), strategy); + myline, std::back_inserter(clipped), strategy); std::cout << boost::geometry::length(clipped.front()) << std::endl; diff --git a/include/boost/geometry/algorithms/detail/disjoint/linear_linear.hpp b/include/boost/geometry/algorithms/detail/disjoint/linear_linear.hpp index 32dfb355c4..c7bfb51763 100644 --- a/include/boost/geometry/algorithms/detail/disjoint/linear_linear.hpp +++ b/include/boost/geometry/algorithms/detail/disjoint/linear_linear.hpp @@ -36,7 +36,6 @@ #include #include -#include #include diff --git a/include/boost/geometry/algorithms/detail/intersects/implementation.hpp b/include/boost/geometry/algorithms/detail/intersects/implementation.hpp index cc41c882b2..208495a778 100644 --- a/include/boost/geometry/algorithms/detail/intersects/implementation.hpp +++ b/include/boost/geometry/algorithms/detail/intersects/implementation.hpp @@ -28,7 +28,6 @@ #include #include -#include #include diff --git a/include/boost/geometry/algorithms/detail/is_simple/linear.hpp b/include/boost/geometry/algorithms/detail/is_simple/linear.hpp index 2ca416d860..90425889d6 100644 --- a/include/boost/geometry/algorithms/detail/is_simple/linear.hpp +++ b/include/boost/geometry/algorithms/detail/is_simple/linear.hpp @@ -31,7 +31,6 @@ #include #include -#include #include #include diff --git a/include/boost/geometry/algorithms/detail/overlay/get_clusters.hpp b/include/boost/geometry/algorithms/detail/overlay/get_clusters.hpp index 9ecbf2bd3f..d8a23f806f 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_clusters.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_clusters.hpp @@ -17,7 +17,6 @@ #include #include #include -#include #include #include @@ -28,7 +27,7 @@ namespace boost { namespace geometry namespace detail { namespace overlay { -template +template struct sweep_equal_policy { @@ -54,7 +53,7 @@ struct sweep_equal_policy }; template <> -struct sweep_equal_policy +struct sweep_equal_policy { template static inline bool equals(P const& p1, P const& p2) @@ -98,7 +97,6 @@ inline void get_clusters(Turns& turns, Clusters& clusters) sweep_equal_policy < - no_rescale_policy, std::is_integral::type>::value > equal_policy; diff --git a/include/boost/geometry/algorithms/detail/overlay/get_intersection_points.hpp b/include/boost/geometry/algorithms/detail/overlay/get_intersection_points.hpp index 77b7d00b93..b458ce21f5 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_intersection_points.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_intersection_points.hpp @@ -22,7 +22,6 @@ #include #include -#include #include diff --git a/include/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp b/include/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp index 4cda28f4fb..457008592a 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp @@ -138,8 +138,8 @@ struct base_turn_handler BOOST_GEOMETRY_ASSERT(index < info.count); geometry::convert(info.intersections[index], ti.point); - ti.operations[0].fraction = info.fractions[index].robust_ra; - ti.operations[1].fraction = info.fractions[index].robust_rb; + ti.operations[0].fraction = info.fractions[index].ra; + ti.operations[1].fraction = info.fractions[index].rb; } template @@ -170,8 +170,8 @@ struct base_turn_handler } else { - ti.operations[i].fraction = i == 0 ? info.fractions[index].robust_ra - : info.fractions[index].robust_rb; + ti.operations[i].fraction = i == 0 ? info.fractions[index].ra + : info.fractions[index].rb; } } } @@ -179,7 +179,7 @@ struct base_turn_handler template static inline unsigned int non_opposite_to_index(IntersectionInfo const& info) { - return info.fractions[0].robust_rb < info.fractions[1].robust_rb + return info.fractions[0].rb < info.fractions[1].rb ? 1 : 0; } diff --git a/include/boost/geometry/algorithms/detail/overlay/get_turn_info_for_endpoint.hpp b/include/boost/geometry/algorithms/detail/overlay/get_turn_info_for_endpoint.hpp index 007ada0f2f..d7064f0cfa 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_turn_info_for_endpoint.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_turn_info_for_endpoint.hpp @@ -19,7 +19,6 @@ #include #include #include -#include namespace boost { namespace geometry { diff --git a/include/boost/geometry/algorithms/detail/overlay/get_turn_info_helpers.hpp b/include/boost/geometry/algorithms/detail/overlay/get_turn_info_helpers.hpp index 5395549e9a..cf951b0738 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_turn_info_helpers.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_turn_info_helpers.hpp @@ -18,7 +18,6 @@ #include #include #include -#include #include namespace boost { namespace geometry { diff --git a/include/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp b/include/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp index 2821512576..f8adfba878 100644 --- a/include/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp @@ -45,8 +45,6 @@ #include -#include - #include #include #include diff --git a/include/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp b/include/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp index 4bc84ae7f7..04d8cee9c6 100644 --- a/include/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp @@ -36,8 +36,6 @@ #include -#include - namespace boost { namespace geometry { diff --git a/include/boost/geometry/algorithms/detail/touches/implementation.hpp b/include/boost/geometry/algorithms/detail/touches/implementation.hpp index 6067a8551e..831f31b5a3 100644 --- a/include/boost/geometry/algorithms/detail/touches/implementation.hpp +++ b/include/boost/geometry/algorithms/detail/touches/implementation.hpp @@ -39,8 +39,6 @@ #include -#include - #include #include #include diff --git a/include/boost/geometry/policies/robustness/no_rescale_policy.hpp b/include/boost/geometry/policies/robustness/no_rescale_policy.hpp deleted file mode 100644 index 39695ff0cf..0000000000 --- a/include/boost/geometry/policies/robustness/no_rescale_policy.hpp +++ /dev/null @@ -1,45 +0,0 @@ -// Boost.Geometry (aka GGL, Generic Geometry Library) - -// Copyright (c) 2013 Barend Gehrels, Amsterdam, the Netherlands. -// Copyright (c) 2013 Bruno Lalande, Paris, France. -// Copyright (c) 2013 Mateusz Loskot, London, UK. -// Copyright (c) 2013 Adam Wulkiewicz, Lodz, Poland. - -// 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_POLICIES_ROBUSTNESS_NO_RESCALE_POLICY_HPP -#define BOOST_GEOMETRY_POLICIES_ROBUSTNESS_NO_RESCALE_POLICY_HPP - -#include - -#include -#include - -namespace boost { namespace geometry -{ - -#ifndef DOXYGEN_NO_DETAIL -namespace detail -{ - -// Redudant later. -struct no_rescale_policy -{ - static bool const enabled = false; - - // We don't rescale but return the reference of the input - template - inline Value const& apply(Value const& value) const - { - return value; - } -}; - -} // namespace detail -#endif - -}} // namespace boost::geometry - -#endif // BOOST_GEOMETRY_POLICIES_ROBUSTNESS_NO_RESCALE_POLICY_HPP diff --git a/include/boost/geometry/policies/robustness/rescale_policy.hpp b/include/boost/geometry/policies/robustness/rescale_policy.hpp deleted file mode 100644 index cbafb96864..0000000000 --- a/include/boost/geometry/policies/robustness/rescale_policy.hpp +++ /dev/null @@ -1,73 +0,0 @@ -// Boost.Geometry (aka GGL, Generic Geometry Library) - -// Copyright (c) 2014-2015 Barend Gehrels, Amsterdam, the Netherlands. -// Copyright (c) 2014-2015 Bruno Lalande, Paris, France. -// Copyright (c) 2014-2015 Mateusz Loskot, London, UK. -// Copyright (c) 2014-2015 Adam Wulkiewicz, Lodz, Poland. - -// This file was modified by Oracle on 2015, 2023. -// Modifications copyright (c) 2015-2023, Oracle and/or its affiliates. - -// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle -// 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) - -#ifndef BOOST_GEOMETRY_POLICIES_ROBUSTNESS_RESCALE_POLICY_HPP -#define BOOST_GEOMETRY_POLICIES_ROBUSTNESS_RESCALE_POLICY_HPP - -#include - -#include -#include - -#include - -#include - -namespace boost { namespace geometry -{ - -#ifndef DOXYGEN_NO_DETAIL -namespace detail -{ - -template -struct robust_policy -{ - static bool const enabled = true; - - typedef typename geometry::coordinate_type::type output_ct; - - robust_policy(FpPoint const& fp_min, IntPoint const& int_min, CalculationType const& the_factor) - : m_fp_min(fp_min) - , m_int_min(int_min) - , m_multiplier(the_factor) - { - } - - template - inline output_ct apply(Value const& value) const - { - // a + (v-b)*f - CalculationType const a = static_cast(get(m_int_min)); - CalculationType const b = static_cast(get(m_fp_min)); - CalculationType const result = a + (value - b) * m_multiplier; - - return geometry::math::rounding_cast(result); - } - - FpPoint m_fp_min; - IntPoint m_int_min; - CalculationType m_multiplier; -}; - -} // namespace detail -#endif - -}} // namespace boost::geometry - - -#endif // BOOST_GEOMETRY_POLICIES_ROBUSTNESS_RESCALE_POLICY_HPP diff --git a/include/boost/geometry/policies/robustness/rescale_policy_tags.hpp b/include/boost/geometry/policies/robustness/rescale_policy_tags.hpp deleted file mode 100644 index 03f90760e9..0000000000 --- a/include/boost/geometry/policies/robustness/rescale_policy_tags.hpp +++ /dev/null @@ -1,43 +0,0 @@ -// Boost.Geometry - -// Copyright (c) 2019-2019 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_POLICIES_ROBUSTNESS_RESCALE_POLICY_TYPE_HPP -#define BOOST_GEOMETRY_POLICIES_ROBUSTNESS_RESCALE_POLICY_TYPE_HPP - -#include - -namespace boost { namespace geometry -{ - -#ifndef DOXYGEN_NO_DETAIL -namespace detail -{ - -struct no_rescale_policy_tag {}; -struct rescale_policy_tag {}; - -template -struct rescale_policy_type -{ - typedef rescale_policy_tag type; -}; - -// Specialization -template <> -struct rescale_policy_type -{ - typedef no_rescale_policy_tag type; -}; - -} // namespace detail -#endif - - -}} // namespace boost::geometry - -#endif // BOOST_GEOMETRY_POLICIES_ROBUSTNESS_RESCALE_POLICY_TYPE_HPP diff --git a/include/boost/geometry/strategies/cartesian/intersection.hpp b/include/boost/geometry/strategies/cartesian/intersection.hpp index 7315c43355..6bd3c8cc59 100644 --- a/include/boost/geometry/strategies/cartesian/intersection.hpp +++ b/include/boost/geometry/strategies/cartesian/intersection.hpp @@ -51,8 +51,6 @@ #include #include -#include - #if defined(BOOST_GEOMETRY_DEBUG_ROBUSTNESS) # include @@ -155,12 +153,12 @@ struct cartesian_segments template void assign_a(Point& point, Segment1 const& a, Segment2 const& ) const { - assign(point, a, dx_a, dy_a, robust_ra); + assign(point, a, dx_a, dy_a, ra); } template void assign_b(Point& point, Segment1 const& , Segment2 const& b) const { - assign(point, b, dx_b, dy_b, robust_rb); + assign(point, b, dx_b, dy_b, rb); } template @@ -237,7 +235,7 @@ struct cartesian_segments < std::is_arithmetic::value >::apply(comparable_length_a(), comparable_length_b(), - robust_ra.edge_value(), robust_rb.edge_value()); + ra.edge_value(), rb.edge_value()); if (use_a) { @@ -252,8 +250,8 @@ struct cartesian_segments // Verify nearly collinear cases (the threshold is arbitrary // but influences performance). If the intersection is located // outside the segments, then it should be moved. - if (robust_ra.possibly_collinear(1.0e-3) - && robust_rb.possibly_collinear(1.0e-3)) + if (ra.possibly_collinear(1.0e-3) + && rb.possibly_collinear(1.0e-3)) { // The segments are nearly collinear and because of the calculation // method with very small denominator, the IP appears outside the @@ -268,8 +266,8 @@ struct cartesian_segments CoordinateType dx_a, dy_a; CoordinateType dx_b, dy_b; - SegmentRatio robust_ra; - SegmentRatio robust_rb; + SegmentRatio ra; + SegmentRatio rb; }; template @@ -498,8 +496,8 @@ struct cartesian_segments } else { - sinfo.robust_ra.assign(nominator_a, denominator_a); - sinfo.robust_rb.assign(nominator_b, denominator_b); + sinfo.ra.assign(nominator_a, denominator_a); + sinfo.rb.assign(nominator_b, denominator_b); } } diff --git a/include/boost/geometry/strategies/geographic/intersection.hpp b/include/boost/geometry/strategies/geographic/intersection.hpp index b1614494d8..632e1484d5 100644 --- a/include/boost/geometry/strategies/geographic/intersection.hpp +++ b/include/boost/geometry/strategies/geographic/intersection.hpp @@ -113,8 +113,8 @@ struct geographic_segments CoordinateType lon; CoordinateType lat; - SegmentRatio robust_ra; - SegmentRatio robust_rb; + SegmentRatio ra; + SegmentRatio rb; intersection_point_flag ip_flag; }; @@ -488,8 +488,8 @@ struct geographic_segments sinfo.lon = lon; sinfo.lat = lat; - sinfo.robust_ra.assign(dist_a1_i1, dist_a1_a2); - sinfo.robust_rb.assign(dist_b1_i1, dist_b1_b2); + sinfo.ra.assign(dist_a1_i1, dist_a1_a2); + sinfo.rb.assign(dist_b1_i1, dist_b1_b2); sinfo.ip_flag = ip_flag; return Policy::segments_crosses(sides, sinfo, a, b); diff --git a/include/boost/geometry/strategies/intersection_result.hpp b/include/boost/geometry/strategies/intersection_result.hpp index 94aae51d8e..477a226ccb 100644 --- a/include/boost/geometry/strategies/intersection_result.hpp +++ b/include/boost/geometry/strategies/intersection_result.hpp @@ -24,8 +24,8 @@ namespace boost { namespace geometry template struct fraction_type { - SegmentRatio robust_ra; // TODO this can be renamed now to "ra" - SegmentRatio robust_rb; + SegmentRatio ra; + SegmentRatio rb; bool initialized; inline fraction_type() @@ -36,15 +36,15 @@ struct fraction_type inline void assign(Info const& info) { initialized = true; - robust_ra = info.robust_ra; - robust_rb = info.robust_rb; + ra = info.ra; + rb = info.rb; } inline void assign(SegmentRatio const& a, SegmentRatio const& b) { initialized = true; - robust_ra = a; - robust_rb = b; + ra = a; + rb = b; } }; diff --git a/include/boost/geometry/strategies/intersection_strategies.hpp b/include/boost/geometry/strategies/intersection_strategies.hpp index 07aa756cb2..0f69049bb0 100644 --- a/include/boost/geometry/strategies/intersection_strategies.hpp +++ b/include/boost/geometry/strategies/intersection_strategies.hpp @@ -63,14 +63,6 @@ private : Tag, CalculationType >::type segment_intersection_strategy_type; - - typedef typename strategy::side::services::default_strategy - < - Tag, - CalculationType - >::type side_strategy_type; - - typedef RobustPolicy rescale_policy_type; }; diff --git a/include/boost/geometry/strategies/spherical/intersection.hpp b/include/boost/geometry/strategies/spherical/intersection.hpp index 11c6695700..31562a31b3 100644 --- a/include/boost/geometry/strategies/spherical/intersection.hpp +++ b/include/boost/geometry/strategies/spherical/intersection.hpp @@ -132,8 +132,8 @@ struct ecef_segments } Vector3d intersection_point; - SegmentRatio robust_ra; - SegmentRatio robust_rb; + SegmentRatio ra; + SegmentRatio rb; intersection_point_flag ip_flag; CalcPolicy const& calc_policy; @@ -423,8 +423,8 @@ struct ecef_segments vec3d_t > sinfo(calc_policy); - sinfo.robust_ra.assign(dist_a1_i1, dist_a1_a2); - sinfo.robust_rb.assign(dist_b1_i1, dist_b1_b2); + sinfo.ra.assign(dist_a1_i1, dist_a1_a2); + sinfo.rb.assign(dist_b1_i1, dist_b1_b2); sinfo.intersection_point = i1; sinfo.ip_flag = ip_flag; diff --git a/test/algorithms/buffer/buffer_variable_width.cpp b/test/algorithms/buffer/buffer_variable_width.cpp index ee39255129..9d528cb3d1 100644 --- a/test/algorithms/buffer/buffer_variable_width.cpp +++ b/test/algorithms/buffer/buffer_variable_width.cpp @@ -159,7 +159,6 @@ void test_buffer(std::string const& caseid, std::string const& wkt, std::vector< distance_strategy, buffer_side_strategy, join_strategy, end_strategy, point_strategy, strategy, - bg::detail::no_rescale_policy(), visitor); #if defined(TEST_WITH_SVG) diff --git a/test/algorithms/is_valid.cpp b/test/algorithms/is_valid.cpp index 82ba5ae469..408d541536 100644 --- a/test/algorithms/is_valid.cpp +++ b/test/algorithms/is_valid.cpp @@ -56,7 +56,7 @@ void geometry_to_svg(Geometry const& geometry, const std::string& case_id) using turn_info = bg::detail::overlay::turn_info < point_type, - typename bg::detail::segment_ratio_type::type + typename bg::segment_ratio_type::type >; using strategy_type = typename bg::strategies::relate::services::default_strategy < @@ -66,20 +66,13 @@ void geometry_to_svg(Geometry const& geometry, const std::string& case_id) strategy_type strategy; -#if defined(BOOST_GEOMETRY_NO_ROBUSTNESS) - bg::detail::no_rescale_policy rescale_policy; -#else - using rescale_policy_type = typename bg::rescale_policy_type::type; - rescale_policy_type rescale_policy = bg::get_rescale_policy(geometry, strategy); -#endif - std::vector turns; bg::detail::self_get_turn_points::no_interrupt_policy policy; bg::self_turns < bg::detail::overlay::assign_null_policy - >(geometry, strategy, rescale_policy, turns, policy); + >(geometry, strategy, turns, policy); for (turn_info const& turn : turns) { diff --git a/test/strategies/segment_intersection_collinear.cpp b/test/strategies/segment_intersection_collinear.cpp index eed44fbb0e..b97b63f776 100644 --- a/test/strategies/segment_intersection_collinear.cpp +++ b/test/strategies/segment_intersection_collinear.cpp @@ -151,8 +151,8 @@ static void test_segment_ratio(std::string const& case_id, BOOST_CHECK_EQUAL(is.count, expected_count); - BOOST_CHECK_EQUAL(is.fractions[0].robust_ra, expected_a1); - BOOST_CHECK_EQUAL(is.fractions[0].robust_rb, expected_b1); + BOOST_CHECK_EQUAL(is.fractions[0].ra, expected_a1); + BOOST_CHECK_EQUAL(is.fractions[0].rb, expected_b1); BOOST_CHECK_EQUAL(bg::get<0>(is.intersections[0]), exp_ax1); BOOST_CHECK_EQUAL(bg::get<1>(is.intersections[0]), exp_ay1); @@ -160,8 +160,8 @@ static void test_segment_ratio(std::string const& case_id, { BOOST_CHECK_EQUAL(bg::get<0>(is.intersections[1]), exp_ax2); BOOST_CHECK_EQUAL(bg::get<1>(is.intersections[1]), exp_ay2); - BOOST_CHECK_EQUAL(is.fractions[1].robust_ra, expected_a2); - BOOST_CHECK_EQUAL(is.fractions[1].robust_rb, expected_b2); + BOOST_CHECK_EQUAL(is.fractions[1].ra, expected_a2); + BOOST_CHECK_EQUAL(is.fractions[1].rb, expected_b2); } } diff --git a/test/strategies/segment_intersection_sph.hpp b/test/strategies/segment_intersection_sph.hpp index d2bcc9dc98..4587b3179c 100644 --- a/test/strategies/segment_intersection_sph.hpp +++ b/test/strategies/segment_intersection_sph.hpp @@ -109,8 +109,8 @@ void test_strategy_one(S1 const& s1, S2 const& s2, if (res_count > 0 && expected_count > 0) { P const& res_i0 = res.intersection_points.intersections[0]; - coord_t denom_a0 = res.intersection_points.fractions[0].robust_ra.denominator(); - coord_t denom_b0 = res.intersection_points.fractions[0].robust_rb.denominator(); + coord_t denom_a0 = res.intersection_points.fractions[0].ra.denominator(); + coord_t denom_b0 = res.intersection_points.fractions[0].rb.denominator(); BOOST_CHECK_MESSAGE(equals_relaxed(res_i0, ip0, eps_scale), "IP0: " << std::setprecision(16) << bg::wkt(res_i0) << " different than expected: " << bg::wkt(ip0) << " for " << bg::wkt(s1) << " and " << bg::wkt(s2)); @@ -122,8 +122,8 @@ void test_strategy_one(S1 const& s1, S2 const& s2, if (res_count > 1 && expected_count > 1) { P const& res_i1 = res.intersection_points.intersections[1]; - coord_t denom_a1 = res.intersection_points.fractions[1].robust_ra.denominator(); - coord_t denom_b1 = res.intersection_points.fractions[1].robust_rb.denominator(); + coord_t denom_a1 = res.intersection_points.fractions[1].ra.denominator(); + coord_t denom_b1 = res.intersection_points.fractions[1].rb.denominator(); BOOST_CHECK_MESSAGE(equals_relaxed(res_i1, ip1, eps_scale), "IP1: " << std::setprecision(16) << bg::wkt(res_i1) << " different than expected: " << bg::wkt(ip1) << " for " << bg::wkt(s1) << " and " << bg::wkt(s2));