[test] add testcase for issue #630
This commit is contained in:
parent
5c5fd7dbef
commit
090e2c4e4a
@ -1476,6 +1476,24 @@ static std::string ticket_12503[2] =
|
||||
"MULTIPOLYGON(((13 18,18 18,18 23,13 23,13 18)))"
|
||||
};
|
||||
|
||||
static std::string issue_630_a[2] =
|
||||
{
|
||||
"MULTIPOLYGON(((-0.3 -0.1475,-0.3 +0.1475,+0.3 +0.1475,+0.3 -0.1475,-0.3 -0.1475)))",
|
||||
"MULTIPOLYGON(((-0.605 +0.1575,+0.254777333596 +1.0172773336,+1.53436796127 -0.262313294074,+0.674590627671 -1.12209062767,-0.605 +0.1575)))"
|
||||
};
|
||||
|
||||
static std::string issue_630_b[2] =
|
||||
{
|
||||
"MULTIPOLYGON(((-0.3 -0.1475,-0.3 +0.1475,+0.3 +0.1475,+0.3 -0.1475,-0.3 -0.1475)))",
|
||||
"MULTIPOLYGON(((-1.215 +0.7675000000000001,-0.4962799075873666 +1.486220092412633,+0.665763075292561 +0.324177109532706,-0.05295701712007228 -0.3945429828799273,-1.215 +0.7675000000000001)))"
|
||||
};
|
||||
|
||||
static std::string issue_630_c[2] =
|
||||
{
|
||||
"MULTIPOLYGON(((-0.3 -0.1475,-0.3 +0.1475,+0.3 +0.1475,+0.3 -0.1475,-0.3 -0.1475)))",
|
||||
"MULTIPOLYGON(((-0.9099999999999999 +0.4625,-0.1912799075873667 +1.181220092412633,+0.9707630752925609 +0.01917710953270602,+0.2520429828799277 -0.6995429828799273,-0.9099999999999999 +0.4625)))"
|
||||
};
|
||||
|
||||
static std::string bug_21155501[2] =
|
||||
{
|
||||
"MULTIPOLYGON(((-8.3935546875 27.449790329784214,4.9658203125 18.729501999072138,11.8212890625 23.563987128451217,9.7119140625 25.48295117535531,9.8876953125 31.728167146023935,8.3056640625 32.99023555965106,8.5693359375 37.16031654673677,-1.8896484375 35.60371874069731,-0.5712890625 32.02670629333614,-8.9208984375 29.458731185355344,-8.3935546875 27.449790329784214)))",
|
||||
|
@ -371,6 +371,16 @@ void test_areal()
|
||||
|
||||
TEST_INTERSECTION(ticket_12503, 2, 13, 17.375);
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
|
||||
// Result is wrong with rescaling
|
||||
TEST_INTERSECTION(issue_630_a, 1, -1, 0.1770);
|
||||
#endif
|
||||
#if ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
|
||||
// Two cases produce either too large, or no output if Kramer rule is used
|
||||
TEST_INTERSECTION(issue_630_b, 1, -1, 0.1714);
|
||||
TEST_INTERSECTION(issue_630_c, 1, -1, 0.1770);
|
||||
#endif
|
||||
|
||||
test_one<Polygon, MultiPolygon, MultiPolygon>("mysql_23023665_7",
|
||||
mysql_23023665_7[0], mysql_23023665_7[1],
|
||||
2, 11, 9.80505786783);
|
||||
|
@ -416,6 +416,16 @@ void test_areal()
|
||||
|
||||
TEST_UNION(ticket_12503, 42, 1, -1, 945.625);
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
|
||||
// Failure with rescaling
|
||||
TEST_UNION(issue_630_a, 1, 0, -1, 2.200326);
|
||||
#endif
|
||||
TEST_UNION(issue_630_b, 1, 0, -1, 1.675976);
|
||||
#if ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
|
||||
// Failure with Kramer rule
|
||||
TEST_UNION(issue_630_c, 1, 0, -1, 1.670367);
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_GEOMETRY_USE_KRAMER_RULE)
|
||||
// Two polygons, should ideally be merged
|
||||
TEST_UNION(mail_2019_01_21_johan, 2, 0, -1, 0.00058896);
|
||||
|
Loading…
Reference in New Issue
Block a user