osrm-backend icon indicating copy to clipboard operation
osrm-backend copied to clipboard

Get Traffic Signals Number

Open GitBenjamin opened this issue 2 years ago • 3 comments

hello, @mjjbell @SiarheiFedartsou How do I get the number of traffic lights on the route? Do I need to do it in osrm-extract? Or is it handled in osrm-routed?

GitBenjamin avatar Mar 09 '23 09:03 GitBenjamin

Not sure what is the best way to do it, but probably you can expose this info through classes which are available in OSRM response afterwards

see https://github.com/Project-OSRM/osrm-backend/blob/51e04209e3c458577d7829208bdee9632e045417/profiles/car.lua#L119

and https://github.com/Project-OSRM/osrm-backend/blob/51e04209e3c458577d7829208bdee9632e045417/profiles/lib/way_handlers.lua#L308

SiarheiFedartsou avatar Mar 09 '23 12:03 SiarheiFedartsou

@SiarheiFedartsou The traffic signal node was originally a node structure, but in the "Expanded_Graphing", the traffic signal info is processed as a part of the road property, just like "motorway". At the same time, traffic signal processing also takes into account the direction.

see Support OSM traffic signal directions

So, if i try to expose traffic signal info through classes, can traffic signals also take the direction into account?

GitBenjamin avatar Mar 10 '23 03:03 GitBenjamin

This issue seems to be stale. It will be closed in 30 days if no further activity occurs.

github-actions[bot] avatar Jun 28 '24 01:06 github-actions[bot]