[colocations] also discard interior-ring turns with a ux
This commit is contained in:
parent
5aa82adbba
commit
08f87517b7
@ -437,9 +437,10 @@ inline void discard_interior_exterior_turns(Turns& turns, Clusters& clusters)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (! turn.both(operation_union))
|
||||
if (! (turn.both(operation_union)
|
||||
|| turn.combination(operation_union, operation_blocked)))
|
||||
{
|
||||
// Not a uu, so cannot be colocated with a iu turn
|
||||
// Not a uu/ux, so cannot be colocated with a iu turn
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -508,6 +508,12 @@ static std::string case_99[2] =
|
||||
"POLYGON((10 10,10 30,30 30,30 10,10 10))"
|
||||
};
|
||||
|
||||
static std::string case_100[2] =
|
||||
{
|
||||
"POLYGON((2 1,4 1,4 3,2 3,2 1),(3 1.5,4 3,2.5 2.5,3 1.5))",
|
||||
"POLYGON((4 0,8 0,8 4,4 4,4 0))"
|
||||
};
|
||||
|
||||
static std::string case_many_situations[2] = {
|
||||
"POLYGON((2 6,2 14,10 18,18 14,18 6,16 5,14 4,12 3,10 2,8 3,6 4,4 5,2 6))",
|
||||
"POLYGON((2 6,2 7,2 8,2 9,2 10,2 11,2 12,1 14"
|
||||
|
@ -203,6 +203,13 @@ void test_all()
|
||||
1, 12, 80.5 + 83.0);
|
||||
#endif
|
||||
|
||||
test_one<polygon, polygon, polygon>("case_100",
|
||||
case_100[0], case_100[1],
|
||||
1, 7, 3.125,
|
||||
1, 7, 16.0,
|
||||
1, 13, 16.0 + 3.125,
|
||||
ignore_validity);
|
||||
|
||||
test_one<polygon, polygon, polygon>("winded",
|
||||
winded[0], winded[1],
|
||||
3, 37, 61,
|
||||
|
@ -243,6 +243,12 @@ void test_areal()
|
||||
test_one<Polygon, Polygon, Polygon>("99",
|
||||
case_99[0], case_99[1], 1, 0, 5, 1600.0);
|
||||
|
||||
if (!ccw)
|
||||
{
|
||||
test_one<Polygon, Polygon, Polygon>("100",
|
||||
case_100[0], case_100[1], 1, 1, 13, 19.125);
|
||||
}
|
||||
|
||||
/*
|
||||
test_one<Polygon, Polygon, Polygon>(102,
|
||||
simplex_normal[0], simplex_reversed[1],
|
||||
@ -473,6 +479,9 @@ void test_areal()
|
||||
test_one<Polygon, Polygon, Polygon>("mysql_23023665_3",
|
||||
mysql_23023665_3[0], mysql_23023665_3[1],
|
||||
2, 1, -1, 225.0 + 66.0);
|
||||
test_one<Polygon, Polygon, Polygon>("mysql_21964049",
|
||||
mysql_21964049[0], mysql_21964049[1],
|
||||
1, 1, -1, 220.5);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -485,11 +494,6 @@ void test_areal()
|
||||
2, 0, -1, 112.0,
|
||||
ignore_validity);
|
||||
}
|
||||
// #holes should be 1
|
||||
test_one<Polygon, Polygon, Polygon>("mysql_21964049",
|
||||
mysql_21964049[0], mysql_21964049[1],
|
||||
1, 0, -1, 220.5,
|
||||
ignore_validity);
|
||||
}
|
||||
|
||||
template <typename P>
|
||||
|
Loading…
Reference in New Issue
Block a user