Skip to content

Commit

Permalink
test: Remove extensions dependency from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vissarion committed Nov 25, 2024
1 parent e13d5d6 commit b3d35b3
Showing 1 changed file with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <boost/geometry/algorithms/envelope.hpp>
#include <boost/geometry/algorithms/within.hpp>

#include <boost/geometry/extensions/algorithms/midpoints.hpp>
//#include <boost/geometry/extensions/algorithms/midpoints.hpp>

#include <boost/geometry/geometries/geometries.hpp>
#include <boost/geometry/geometries/point_xy.hpp>
Expand Down Expand Up @@ -213,14 +213,9 @@ public :
bg::convert(segment, seg2);

bg::strategy::intersection::cartesian_segments<> strategy;
bg::policies::relate::segments_intersection_points
<
bg::segment_intersection_points<point_t>
> policy;

bg::detail::segment_as_subrange<segment_t> subrange1(seg1);
bg::detail::segment_as_subrange<segment_t> subrange2(seg2);
bg::segment_intersection_points<point_t> is
bg::segment_intersection_points<point_t> is
= strategy.apply(subrange1, subrange2, policy_t());

if (is.count == 2)
Expand Down Expand Up @@ -307,6 +302,7 @@ bool verify(std::string const& caseid, MultiPolygon const& mp, Linestring const&
border_check<MultiPolygon> bc(mp, result);
bg::for_each_segment(difference, bc);

/* commented out since it needs extensions, tests are passing without that part
// 3) check also the mid-points from the difference to remove false positives
for (Linestring const& d : difference)
{
Expand All @@ -315,11 +311,11 @@ bool verify(std::string const& caseid, MultiPolygon const& mp, Linestring const&
outside_check<MultiPolygon> ocm(mp, result);
bg::for_each_point(difference_midpoints, ocm);
}

*/
if (settings.verbose)
{
std::cout << " [" << bg::area(mp) << " " << bg::length(ls) <<
" " << bg::length(intersection) <<
std::cout << " [" << bg::area(mp) << " " << bg::length(ls) <<
" " << bg::length(intersection) <<
" " << bg::length(difference) << "]";
}

Expand Down

0 comments on commit b3d35b3

Please sign in to comment.