[intersection/enrich] don' t skip after ii if it is about interior rings,

they should be traversed. This fixes case mysql_21965285_b_inv
and helps for cases #58 (no backtracking)
This commit is contained in:
Barend Gehrels 2015-11-21 19:01:51 +01:00
parent 6fb034581a
commit 939bf656f9
2 changed files with 9 additions and 3 deletions

View File

@ -95,6 +95,7 @@ inline void skip_after_ii(Turns const& turn_points, Operations& operations)
turn_type cluster_turn = turn_points[it->turn_index];
turn_operation_type cluster_op = cluster_turn.operations[it->operation_index];
turn_operation_type cluster_other_op = cluster_turn.operations[1 - it->operation_index];
bool both_ii = cluster_turn.both(operation_intersection);
@ -102,12 +103,19 @@ inline void skip_after_ii(Turns const& turn_points, Operations& operations)
{
turn_type const& turn = turn_points[it->turn_index];
turn_operation_type const& op = turn.operations[it->operation_index];
turn_operation_type const& other_op = turn.operations[1 - it->operation_index];
if (both_ii
&& cluster_op.seg_id == op.seg_id
&& cluster_op.fraction == op.fraction)
{
it->skip = true;
if (op.seg_id.ring_index == -1
&& cluster_other_op.seg_id.ring_index == -1
&& other_op.seg_id.ring_index == -1)
{
// Colocated with ii on exterior rings, skip
it->skip = true;
}
}
else
{

View File

@ -345,12 +345,10 @@ void test_areal()
mysql_21964465[0], mysql_21964465[1],
0, -1, 0.0);
#ifdef BOOST_GEOMETRY_TEST_INCLUDE_FAILING_TESTS
test_one<Polygon, Polygon, Polygon>("mysql_21965285_b_inv",
mysql_21965285_b_inv[0],
mysql_21965285_b_inv[1],
2, -1, 183.71376870369406);
#endif
return;