[overlay] fix new #case_recursive_boxes_82 by greatly simplifying the code.

patterns/aggregations were added to solve specific intersection problems
and validity in the past. In the meantime self-turns and isolation information
is much better, and those code is not needed anymore.
This also fixes the #mysql_regression_1_65_2017_08_31
This also makes union/intersection code for handling clusters much more similar
This commit is contained in:
Barend Gehrels
2017-12-15 13:20:41 +01:00
parent f0d74e3386
commit 5d99d1608d
6 changed files with 36 additions and 809 deletions

View File

@@ -1242,6 +1242,14 @@ static std::string case_recursive_boxes_81[2] =
"MULTIPOLYGON(((2 4,2 2,1 2,0 1,0 3,1 3,1 4,2 4)),((2 4,2 5,3 4,2 4)),((3 4,5 4,5 3,3 3,3 4)),((1 4,0 4,0 5,1 5,1 4)),((2 1,2 0,0 0,0 1,2 1)),((4 2,5 2,4 1,3 1,4 2)),((4 1,5 1,4 0,4 1)))"
};
static std::string case_recursive_boxes_82[2] =
{
// Contains two outgoing arcs on same ring causing current aggregation implementation to fail.
// Fixed by greatly simplifying the code, skipping aggregations and using sbs directly (which is now possible, now that isolation-information is much better)
"MULTIPOLYGON(((4 0,5 1,5 0,4 0)),((3 3,3 1,4 1,3 0,0 0,0 5,1 5,1 4,1.5 3.5,2 4,2 3,3 3),(2 2,2 1,3 2,2 2)),((2 4,3 5,4 5,3.5 4.5,5 3,3 3,3 4,2 4)),((4 4,4 5,5 5,4.5 4.5,5 4,4 4)))",
"MULTIPOLYGON(((2 4,2 5,4 5,4 4,2 4)),((2 4,2 3,5 3,5 2,4 2,4 1,1 1,1 2,0 2,0 5,1 5,1 4,2 4),(2 2,1 2,1.5 1.5,2 2),(3 2,3.5 1.5,4 2,3 2)),((4 4,5 5,5 4,4 4)))"
};
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)))",

View File

@@ -448,12 +448,7 @@ void test_areal()
sym_settings);
}
#if defined(BOOST_GEOMETRY_INCLUDE_SELF_TURNS) && ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
TEST_DIFFERENCE(mysql_regression_1_65_2017_08_31, 1, 4.30697514e-7, 3, 152.0642, 4);
#else
// Misses one turn which is actually weird because there are no self-turns involved
TEST_DIFFERENCE(mysql_regression_1_65_2017_08_31, 0, 0, 3, 152.0642, 3);
#endif
}

View File

@@ -356,6 +356,11 @@ void test_areal()
TEST_INTERSECTION(case_recursive_boxes_79, 5, -1, 9.0);
TEST_INTERSECTION(case_recursive_boxes_80, 1, -1, 0.25);
TEST_INTERSECTION(case_recursive_boxes_81, 5, -1, 3.75);
#ifdef BOOST_GEOMETRY_INCLUDE_SELF_TURNS
TEST_INTERSECTION(case_recursive_boxes_82, 5, -1, 8.5);
#else
TEST_INTERSECTION_IGNORE(case_recursive_boxes_82, 3, -1, 8.5);
#endif
test_one<Polygon, MultiPolygon, MultiPolygon>("ggl_list_20120915_h2_a",
ggl_list_20120915_h2[0], ggl_list_20120915_h2[1],