// Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
// Copyright (c) 2013-2014 Adam Wulkiewicz, Lodz, Poland.
-// This file was modified by Oracle on 2013-2020.
-// Modifications copyright (c) 2013-2020, Oracle and/or its affiliates.
+// This file was modified by Oracle on 2013-2021.
+// Modifications copyright (c) 2013-2021, Oracle and/or its affiliates.
-// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// 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.
#include <boost/geometry/algorithms/not_implemented.hpp>
#include <boost/geometry/algorithms/detail/assign_indexed_point.hpp>
-#include <boost/geometry/algorithms/detail/check_iterator_range.hpp>
#include <boost/geometry/algorithms/detail/point_on_border.hpp>
#include <boost/geometry/algorithms/detail/disjoint/linear_linear.hpp>
point1_type p;
geometry::point_on_border(p, g1);
- return !geometry::covered_by(p, g2, strategy);
+ return ! geometry::covered_by(p, g2, strategy);
}
};
return false;
}
- return NoIntersectionsPolicy
- ::apply(g1, g2,
- strategy.template get_point_in_geometry_strategy<Geometry1, Geometry2>());
+ return NoIntersectionsPolicy::apply(g1, g2, strategy);
}
};
template <typename Segment, typename Polygon>
class disjoint_segment_areal<Segment, Polygon, polygon_tag>
{
-private:
+
template <typename InteriorRings, typename Strategy>
static inline
bool check_interior_rings(InteriorRings const& interior_rings,
Segment const& segment,
Strategy const& strategy)
{
- typedef typename boost::range_value<InteriorRings>::type ring_type;
+ using ring_type = typename boost::range_value<InteriorRings>::type;
- typedef unary_disjoint_geometry_to_query_geometry
+ using unary_predicate_type = unary_disjoint_geometry_to_query_geometry
<
Segment,
Strategy,
- disjoint_range_segment_or_box
- <
- ring_type, closure<ring_type>::value, Segment
- >
- > unary_predicate_type;
-
- return check_iterator_range
- <
- unary_predicate_type
- >::apply(boost::begin(interior_rings),
- boost::end(interior_rings),
- unary_predicate_type(segment, strategy));
+ disjoint_range_segment_or_box<ring_type, Segment>
+ >;
+
+ return std::all_of(boost::begin(interior_rings),
+ boost::end(interior_rings),
+ unary_predicate_type(segment, strategy));
}
Polygon const& polygon,
IntersectionStrategy const& strategy)
{
- typedef typename geometry::ring_type<Polygon>::type ring;
-
- if ( !disjoint_range_segment_or_box
- <
- ring, closure<Polygon>::value, Segment
- >::apply(geometry::exterior_ring(polygon), segment, strategy) )
+ if (! disjoint_range_segment_or_box
+ <
+ typename geometry::ring_type<Polygon>::type,
+ Segment
+ >::apply(geometry::exterior_ring(polygon), segment, strategy))
{
return false;
}
- if ( !check_interior_rings(geometry::interior_rings(polygon), segment, strategy) )
+ if (! check_interior_rings(geometry::interior_rings(polygon), segment, strategy))
{
return false;
}
typename point_type<Segment>::type p;
detail::assign_point_from_index<0>(segment, p);
- return !geometry::covered_by(p, polygon,
- strategy.template get_point_in_geometry_strategy<Segment, Polygon>());
+ return ! geometry::covered_by(p, polygon, strategy);
}
};
Ring const& ring,
IntersectionStrategy const& strategy)
{
- if ( !disjoint_range_segment_or_box
- <
- Ring, closure<Ring>::value, Segment
- >::apply(ring, segment, strategy) )
+ if (! disjoint_range_segment_or_box<Ring, Segment>::apply(ring, segment, strategy))
{
return false;
}
typename point_type<Segment>::type p;
detail::assign_point_from_index<0>(segment, p);
- return !geometry::covered_by(p, ring,
- strategy.template get_point_in_geometry_strategy<Segment, Ring>());
+ return ! geometry::covered_by(p, ring, strategy);
}
};