[overlay] remove original behaviour to discard turns colocated with blocked turns,
because this stops generating interior rings in certain configurations, and it is, in the meantime, handled differently in cluster traversal. Fixes cases like new case #case_recursive_boxes_51
This commit is contained in:
parent
6088389338
commit
bd16305a72
@ -262,15 +262,6 @@ inline void handle_colocation_cluster(Turns& turns,
|
||||
add_cluster_id(other_op, cluster_per_segment, ref_id);
|
||||
id = ref_id;
|
||||
}
|
||||
|
||||
// In case of colocated xx turns, all other turns may NOT be
|
||||
// followed at all. xx cannot be discarded (otherwise colocated
|
||||
// turns are followed).
|
||||
if (ref_turn.both(operation_blocked))
|
||||
{
|
||||
turn.discarded = true;
|
||||
// We can either set or not set colocated because it is not effective on blocked turns
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -967,6 +967,13 @@ static std::string case_recursive_boxes_50[2] =
|
||||
"MULTIPOLYGON(((5 3,5 4,6 4,6 3,5 3)),((5 7,6 7,6 5,4 5,4 6,3 6,3 7,4 7,4 8,5 8,5 7)),((3 6,3 4,4 4,4 3,1 3,1 2,0 2,0 9,1 9,1 10,3 10,3 9,2 9,2 8,3 8,3 7,1 7,1 6,3 6),(1 5,1 4,2 4,2 5,1 5)),((4 0,0 0,0 1,1 1,1 2,3 2,3 1,5 1,5 0,4 0)),((7 6,7 7,8 7,8 8,9 8,9 6,8 6,8 5,7 5,7 6)),((9 0,7 0,7 1,9 1,9 2,10 2,10 0,9 0)),((7 9,5 9,5 10,7 10,7 9)),((7 9,8 9,8 8,7 8,7 9)),((8 3,8 2,7 2,7 3,8 3)),((8 3,8 4,9 4,9 3,8 3)),((8 9,8 10,9 10,9 9,8 9)),((9 8,9 9,10 9,10 8,9 8)))"
|
||||
};
|
||||
|
||||
static std::string case_recursive_boxes_51[2] =
|
||||
{
|
||||
// Needs keeping colocated turns with a xx turn to properly generate interior rings. It also needs self-turns for validity
|
||||
"MULTIPOLYGON(((0 4,0 5,1 5,1 4,0 4)),((2 1,3 1,3 0,2 0,2 1)),((3 3,4 3,4 2,3 2,3 3)),((5 4,6 4,6 3,5 3,5 4)),((2 3,2 4,3 4,3 3,2 3)),((5 6,4 6,4 5,3 5,3 10,4 10,4 9,5 9,5 8,4 8,4 7,6 7,6 9,7 9,7 10,8 10,8 8,7 8,7 7,8 7,8 4,7 4,7 5,6 5,6 6,5 6)),((5 0,4 0,4 1,5 1,5 2,6 2,6 3,7 3,7 1,8 1,8 0,5 0)),((0 2,1 2,1 1,0 1,0 2)),((1 2,1 3,2 3,2 2,1 2)),((1 10,2 10,2 8,1 8,1 9,0 9,0 10,1 10)),((1 8,1 7,0 7,0 8,1 8)),((10 1,10 0,9 0,9 1,8 1,8 4,9 4,9 6,10 6,10 1)))",
|
||||
"MULTIPOLYGON(((3 1,4 1,4 0,2 0,2 1,3 1)),((1 9,0 9,0 10,1 10,1 9)),((8 2,9 2,9 1,10 1,10 0,8 0,8 2)),((5 8,4 8,4 9,5 9,5 10,7 10,7 8,8 8,8 7,7 7,7 6,8 6,8 7,10 7,10 6,9 6,9 3,8 3,8 2,6 2,6 1,5 1,5 3,7 3,7 4,4 4,4 5,5 5,5 6,6 6,6 8,5 8),(7 5,7 4,8 4,8 5,7 5)),((4 4,4 3,2 3,2 4,1 4,1 5,0 5,0 7,1 7,1 9,2 9,2 8,4 8,4 6,3 6,3 4,4 4),(1 5,2 5,2 6,1 6,1 5)),((0 3,1 3,1 1,0 1,0 3)),((4 9,3 9,3 10,4 10,4 9)),((9 10,10 10,10 9,9 9,9 8,8 8,8 10,9 10)))"
|
||||
};
|
||||
|
||||
static std::string pie_21_7_21_0_3[2] =
|
||||
{
|
||||
"MULTIPOLYGON(((2500 2500,2500 3875,2855 3828,3187 3690,3472 3472,3690 3187,3828 2855,3875 2500,3828 2144,3690 1812,3472 1527,3187 1309,2855 1171,2499 1125,2144 1171,1812 1309,1527 1527,1309 1812,1171 2144,1125 2499,1171 2855,1309 3187,2500 2500)))",
|
||||
|
@ -334,6 +334,7 @@ void test_areal()
|
||||
TEST_DIFFERENCE_IGNORE(case_recursive_boxes_49, 9, 22.0, 10, 17.0, 10);
|
||||
#endif
|
||||
TEST_DIFFERENCE(case_recursive_boxes_50, 14, 21.0, 16, 21.0, 14);
|
||||
TEST_DIFFERENCE(case_recursive_boxes_51, 14, 25.0, 12, 31.0, 7);
|
||||
|
||||
test_one<Polygon, MultiPolygon, MultiPolygon>("mysql_21965285_b",
|
||||
mysql_21965285_b[0],
|
||||
|
@ -290,6 +290,7 @@ void test_areal()
|
||||
TEST_INTERSECTION(case_recursive_boxes_48, 1, 5, 1.0);
|
||||
TEST_INTERSECTION(case_recursive_boxes_49, 7, 57, 20.0);
|
||||
TEST_INTERSECTION(case_recursive_boxes_50, 9, 71, 26.0);
|
||||
TEST_INTERSECTION(case_recursive_boxes_51, 14, 79, 19.0);
|
||||
|
||||
test_one<Polygon, MultiPolygon, MultiPolygon>("ggl_list_20120915_h2_a",
|
||||
ggl_list_20120915_h2[0], ggl_list_20120915_h2[1],
|
||||
|
@ -359,8 +359,15 @@ void test_areal()
|
||||
#else
|
||||
TEST_UNION_IGNORE(case_recursive_boxes_49, 1, 2, -1, 59.0);
|
||||
#endif
|
||||
|
||||
TEST_UNION(case_recursive_boxes_50, 7, 4, -1, 68.0);
|
||||
|
||||
#ifdef BOOST_GEOMETRY_INCLUDE_SELF_TURNS
|
||||
TEST_UNION(case_recursive_boxes_51, 2, 6, -1, 75.0);
|
||||
#else
|
||||
TEST_UNION_IGNORE(case_recursive_boxes_51, 2, 5, -1, 75.0);
|
||||
#endif
|
||||
|
||||
test_one<Polygon, MultiPolygon, MultiPolygon>("ggl_list_20120915_h2_a",
|
||||
ggl_list_20120915_h2[0], ggl_list_20120915_h2[1],
|
||||
1, 0, 12, 23.0); // Area from SQL Server
|
||||
|
Loading…
Reference in New Issue
Block a user