|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r76469 - trunk/boost/geometry/algorithms/detail/overlay
From: barend.gehrels_at_[hidden]
Date: 2012-01-13 15:50:44
Author: barendgehrels
Date: 2012-01-13 15:50:43 EST (Fri, 13 Jan 2012)
New Revision: 76469
URL: http://svn.boost.org/trac/boost/changeset/76469
Log:
Bugfix, in get_turns segments in the same source should only be skipped if iterated linearly. If coming from a partition, it might be different. By default don't skipped them.
Text files modified:
trunk/boost/geometry/algorithms/detail/overlay/get_turns.hpp | 4 +++-
trunk/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp | 1 +
2 files changed, 4 insertions(+), 1 deletions(-)
Modified: trunk/boost/geometry/algorithms/detail/overlay/get_turns.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/detail/overlay/get_turns.hpp (original)
+++ trunk/boost/geometry/algorithms/detail/overlay/get_turns.hpp 2012-01-13 15:50:43 EST (Fri, 13 Jan 2012)
@@ -158,6 +158,7 @@
static inline bool apply(
int source_id1, Geometry1 const& geometry1, Section1 const& sec1,
int source_id2, Geometry2 const& geometry2, Section2 const& sec2,
+ bool skip_larger,
Turns& turns,
InterruptPolicy& interrupt_policy)
{
@@ -229,7 +230,7 @@
// Also skip if index1 < index2 to avoid getting all
// intersections twice (only do this on same source!)
- skip = index1 >= index2
+ skip = (skip_larger && index1 >= index2)
|| ndi2 == ndi1 + 1
|| neighbouring<Geometry1>(sec1, index1, index2)
;
@@ -405,6 +406,7 @@
>::apply(
m_source_id1, m_geometry1, sec1,
m_source_id2, m_geometry2, sec2,
+ false,
m_turns, m_interrupt_policy);
}
return true;
Modified: trunk/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp (original)
+++ trunk/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp 2012-01-13 15:50:43 EST (Fri, 13 Jan 2012)
@@ -87,6 +87,7 @@
>::apply(
0, m_geometry, sec1,
0, m_geometry, sec2,
+ false,
m_turns, m_interrupt_policy);
}
if (m_interrupt_policy.has_intersections)
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk