Fix unnecessary duplication of backward segments for non-split edges
for edges with the split flag false and in_backward_direction true if in_forward_direction is also true backward segments can be incorrectly duplicated
This commit is contained in:
parent
7a1a209168
commit
4ab3165ae3
@ -330,7 +330,7 @@ void ExtractorCallbacks::ProcessWay(const osmium::Way &input_way, const Extracti
|
|||||||
(turn_lane_id_forward != turn_lane_id_backward));
|
(turn_lane_id_forward != turn_lane_id_backward));
|
||||||
|
|
||||||
if (in_forward_direction)
|
if (in_forward_direction)
|
||||||
{
|
{ // add (forward) segments or (forward,backward) for non-split edges in backward direction
|
||||||
util::for_each_pair(
|
util::for_each_pair(
|
||||||
nodes.cbegin(),
|
nodes.cbegin(),
|
||||||
nodes.cend(),
|
nodes.cend(),
|
||||||
@ -355,8 +355,8 @@ void ExtractorCallbacks::ProcessWay(const osmium::Way &input_way, const Extracti
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in_backward_direction || split_edge)
|
if (in_backward_direction && (!in_forward_direction || split_edge))
|
||||||
{
|
{ // add (backward) segments for split edges or not in forward direction
|
||||||
util::for_each_pair(
|
util::for_each_pair(
|
||||||
nodes.cbegin(),
|
nodes.cbegin(),
|
||||||
nodes.cend(),
|
nodes.cend(),
|
||||||
|
Loading…
Reference in New Issue
Block a user