mirror of
https://github.com/boostorg/geometry.git
synced 2026-02-12 12:12:10 +00:00
Merge branch 'feature/relate' of https://github.com/boostorg/geometry into feature/setops
This commit is contained in:
@@ -66,10 +66,10 @@ public:
|
||||
}
|
||||
else if ( BoundaryQuery == boundary_any )
|
||||
{
|
||||
return sid.segment_index == 0
|
||||
&& detail::equals::equals_point_point(pt, range::front(geometry))
|
||||
|| sid.segment_index + 2 == geometry::num_points(geometry)
|
||||
&& detail::equals::equals_point_point(pt, range::back(geometry));
|
||||
return ( sid.segment_index == 0
|
||||
&& detail::equals::equals_point_point(pt, range::front(geometry)) )
|
||||
|| ( sid.segment_index + 2 == geometry::num_points(geometry)
|
||||
&& detail::equals::equals_point_point(pt, range::back(geometry)) );
|
||||
}
|
||||
|
||||
BOOST_ASSERT(false);
|
||||
|
||||
@@ -404,7 +404,7 @@ struct linear_linear
|
||||
template <typename Point>
|
||||
class exit_watcher
|
||||
{
|
||||
typedef point_identifier<Point> point_identifier;
|
||||
typedef point_identifier<Point> point_info;
|
||||
|
||||
public:
|
||||
exit_watcher()
|
||||
@@ -415,7 +415,7 @@ struct linear_linear
|
||||
bool enter(Point const& point, segment_identifier const& other_id)
|
||||
{
|
||||
bool result = other_entry_points.empty();
|
||||
other_entry_points.push_back(point_identifier(other_id, point));
|
||||
other_entry_points.push_back(point_info(other_id, point));
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -428,7 +428,7 @@ struct linear_linear
|
||||
if ( other_entry_points.empty() )
|
||||
return true;
|
||||
|
||||
typedef typename std::vector<point_identifier>::iterator point_iterator;
|
||||
typedef typename std::vector<point_info>::iterator point_iterator;
|
||||
// search for the entry point in the same range of other geometry
|
||||
point_iterator entry_it = std::find_if(other_entry_points.begin(),
|
||||
other_entry_points.end(),
|
||||
@@ -440,7 +440,7 @@ struct linear_linear
|
||||
// here we know that we possibly left LS
|
||||
// we must still check if we didn't get back on the same point
|
||||
exit_operation = exit_op;
|
||||
exit_id = point_identifier(other_id, point);
|
||||
exit_id = point_info(other_id, point);
|
||||
|
||||
// erase the corresponding entry point
|
||||
other_entry_points.erase(entry_it);
|
||||
@@ -467,8 +467,8 @@ struct linear_linear
|
||||
|
||||
private:
|
||||
overlay::operation_type exit_operation;
|
||||
point_identifier exit_id;
|
||||
std::vector<point_identifier> other_entry_points; // TODO: use map here or sorted vector?
|
||||
point_info exit_id;
|
||||
std::vector<point_info> other_entry_points; // TODO: use map here or sorted vector?
|
||||
};
|
||||
|
||||
// This analyser should be used like Input or SinglePass Iterator
|
||||
|
||||
@@ -41,12 +41,12 @@
|
||||
#include <boost/geometry/views/closeable_view.hpp>
|
||||
#include <boost/geometry/views/reversible_view.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/relate/result.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/relate/point_point.hpp>
|
||||
#include <boost/geometry/algorithms/detail/relate/point_geometry.hpp>
|
||||
#include <boost/geometry/algorithms/detail/relate/linear_linear.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/detail/relate/result.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ test-suite boost-geometry-algorithms
|
||||
[ run overlaps.cpp ]
|
||||
[ run perimeter.cpp ]
|
||||
[ run point_on_surface.cpp ]
|
||||
[ run relate.cpp ]
|
||||
[ run remove_spikes.cpp ]
|
||||
[ run reverse.cpp ]
|
||||
[ run simplify.cpp ]
|
||||
|
||||
@@ -85,7 +85,9 @@ void check_geometry(
|
||||
|
||||
BOOST_FOREACH(std::string const& s, expected)
|
||||
{
|
||||
std::vector<turn_info>::iterator it = std::find_if(turns.begin(), turns.end(), equal_turn(s));
|
||||
typename std::vector<turn_info>::iterator
|
||||
it = std::find_if(turns.begin(), turns.end(), equal_turn(s));
|
||||
|
||||
if ( it != turns.end() )
|
||||
turns.erase(it);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user