mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-12 14:01:47 +00:00
[buffer] discard turns instead of setting them to blocked, because that
might discard valid turns during the colocation check
This commit is contained in:
parent
f364ed8d73
commit
cacb8c4af5
@ -1330,17 +1330,12 @@ struct buffered_piece_collection
|
|||||||
for (typename boost::range_iterator<turn_vector_type>::type it =
|
for (typename boost::range_iterator<turn_vector_type>::type it =
|
||||||
boost::begin(m_turns); it != boost::end(m_turns); ++it)
|
boost::begin(m_turns); it != boost::end(m_turns); ++it)
|
||||||
{
|
{
|
||||||
if (it->location != location_ok)
|
buffer_turn_info_type& turn = *it;
|
||||||
|
if (turn.location != location_ok)
|
||||||
{
|
{
|
||||||
// Set it to blocked. They should not be discarded, to avoid
|
// Discard this turn (don't set it to blocked to avoid colocated
|
||||||
// generating rings over these turns
|
// clusters being discarded afterwards
|
||||||
// Performance goes down a tiny bit from 161 s to 173 because there
|
turn.discarded = true;
|
||||||
// are sometimes much more turns.
|
|
||||||
// We might speed it up a bit by keeping only one blocked
|
|
||||||
// intersection per segment, but that is complex to program
|
|
||||||
// because each turn involves two segments
|
|
||||||
it->operations[0].operation = detail::overlay::operation_blocked;
|
|
||||||
it->operations[1].operation = detail::overlay::operation_blocked;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -285,10 +285,10 @@ void test_all()
|
|||||||
test_one<linestring, polygon>("mysql_report_2015_09_08a", mysql_report_2015_09_08a, join_round32, end_round32, 0.0, 1.0);
|
test_one<linestring, polygon>("mysql_report_2015_09_08a", mysql_report_2015_09_08a, join_round32, end_round32, 0.0, 1.0);
|
||||||
test_one<linestring, polygon>("mysql_report_2015_09_08b", mysql_report_2015_09_08b, join_round32, end_round32, 0.0, 1099511627778.0);
|
test_one<linestring, polygon>("mysql_report_2015_09_08b", mysql_report_2015_09_08b, join_round32, end_round32, 0.0, 1099511627778.0);
|
||||||
test_one<linestring, polygon>("mysql_report_2015_09_08c", mysql_report_2015_09_08c, join_round32, end_round32, 0.0, 0xbe);
|
test_one<linestring, polygon>("mysql_report_2015_09_08c", mysql_report_2015_09_08c, join_round32, end_round32, 0.0, 0xbe);
|
||||||
|
#endif
|
||||||
|
|
||||||
test_one<linestring, polygon>("mysql_23023665_1", mysql_23023665, join_round32, end_flat, 459.1051, 10);
|
test_one<linestring, polygon>("mysql_23023665_1", mysql_23023665, join_round32, end_flat, 459.1051, 10);
|
||||||
test_one<linestring, polygon>("mysql_23023665_2", mysql_23023665, join_round32, end_flat, 6877.6941, 50);
|
test_one<linestring, polygon>("mysql_23023665_2", mysql_23023665, join_round32, end_flat, 6877.7097, 50);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <bool Clockwise, typename P>
|
template <bool Clockwise, typename P>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user