Take stop signs into account during routing
This commit is contained in:
parent
3080be59ed
commit
ee008e75e5
@ -82,13 +82,16 @@ void ExtractorCallbacks::ProcessNode(const osmium::Node &input_node,
|
||||
{
|
||||
external_memory.external_traffic_signals.push_back({id, result_node.traffic_lights});
|
||||
}
|
||||
// TODO: we ignore `ALL` for both stop signs and give way signs, because we cannot understand direction of the way they should be applied yet
|
||||
// see: https://wiki.openstreetmap.org/wiki/Tag:highway%3Dstop#Direction
|
||||
if (result_node.give_way != TrafficFlowControlNodeDirection::NONE && result_node.give_way != TrafficFlowControlNodeDirection::ALL)
|
||||
// TODO: we ignore `ALL` for both stop signs and give way signs, because we cannot understand
|
||||
// direction of the way they should be applied yet see:
|
||||
// https://wiki.openstreetmap.org/wiki/Tag:highway%3Dstop#Direction
|
||||
if (result_node.give_way != TrafficFlowControlNodeDirection::NONE &&
|
||||
result_node.give_way != TrafficFlowControlNodeDirection::ALL)
|
||||
{
|
||||
external_memory.external_give_ways.push_back({id, result_node.give_way});
|
||||
}
|
||||
if (result_node.stop_sign != TrafficFlowControlNodeDirection::NONE && result_node.stop_sign != TrafficFlowControlNodeDirection::ALL)
|
||||
if (result_node.stop_sign != TrafficFlowControlNodeDirection::NONE &&
|
||||
result_node.stop_sign != TrafficFlowControlNodeDirection::ALL)
|
||||
{
|
||||
external_memory.external_stop_signs.push_back({id, result_node.stop_sign});
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ BOOST_AUTO_TEST_CASE(simple_intersection_connectivity)
|
||||
TrafficFlowControlNodes traffic_lights;
|
||||
TrafficFlowControlNodes stop_signs;
|
||||
TrafficFlowControlNodes give_way_signs;
|
||||
|
||||
|
||||
std::vector<NodeBasedEdgeAnnotation> annotations{
|
||||
{EMPTY_NAMEID, 0, INAVLID_CLASS_DATA, TRAVEL_MODE_DRIVING, false},
|
||||
{EMPTY_NAMEID, 1, INAVLID_CLASS_DATA, TRAVEL_MODE_DRIVING, false}};
|
||||
|
Loading…
Reference in New Issue
Block a user