summaryrefslogtreecommitdiff
path: root/boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp')
-rw-r--r--boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp b/boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp
index 47225328df..e25445651a 100644
--- a/boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp
+++ b/boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp
@@ -118,7 +118,7 @@ inline void enrich_assign(Operations& operations, Turns& turns)
// Cluster behaviour: next should point after cluster, unless
// their seg_ids are not the same
- while (turn.cluster_id != -1
+ while (turn.is_clustered()
&& it->turn_index != next->turn_index
&& turn.cluster_id == turns[next->turn_index].cluster_id
&& op.seg_id == turns[next->turn_index].operations[next->operation_index].seg_id)
@@ -245,10 +245,6 @@ inline void calculate_remaining_distance(Turns& turns)
++it)
{
turn_type& turn = *it;
- if (! turn.both(detail::overlay::operation_continue))
- {
- continue;
- }
op_type& op0 = turn.operations[0];
op_type& op1 = turn.operations[1];
@@ -261,7 +257,7 @@ inline void calculate_remaining_distance(Turns& turns)
int const to_index0 = op0.enriched.get_next_turn_index();
int const to_index1 = op1.enriched.get_next_turn_index();
- if (to_index1 >= 0
+ if (to_index0 >= 0
&& to_index1 >= 0
&& to_index0 != to_index1)
{
@@ -359,12 +355,11 @@ inline void enrich_intersection_points(Turns& turns,
}
if (detail::overlay::is_self_turn<OverlayType>(turn)
- && turn.cluster_id < 0
+ && ! turn.is_clustered()
&& ! turn.both(target_operation))
{
// Only keep self-uu-turns or self-ii-turns
turn.discarded = true;
- turn.cluster_id = -1;
continue;
}
@@ -379,12 +374,12 @@ inline void enrich_intersection_points(Turns& turns,
<
OverlayType,
target_operation
- >::apply(turns, geometry1, geometry2);
+ >::apply(turns, clusters, geometry1, geometry2);
detail::overlay::discard_open_turns
<
OverlayType,
target_operation
- >::apply(turns, geometry1, geometry2);
+ >::apply(turns, clusters, geometry1, geometry2);
// Create a map of vectors of indexed operation-types to be able
// to sort intersection points PER RING
@@ -421,6 +416,9 @@ inline void enrich_intersection_points(Turns& turns,
detail::overlay::enrich_assign(mit->second, turns);
}
+ // Check some specific type of self-turns (after getting enriched info)
+ detail::overlay::discard_self_turns_which_loop<OverlayType>(turns);
+
if (has_colocations)
{
// First gather cluster properties (using even clusters with