Project-OSRM / osrm-backend

Open Source Routing Machine - C++ backend
http://map.project-osrm.org
BSD 2-Clause "Simplified" License
6.18k stars 3.28k forks source link

Get Traffic Signals Number #6570

Open GitBenjamin opened 1 year ago

GitBenjamin commented 1 year ago

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?

SiarheiFedartsou commented 1 year ago

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

GitBenjamin commented 1 year ago

@SiarheiFedartsou The traffic signal node was originally a node structure, but in the _"ExpandedGraphing", 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?

github-actions[bot] commented 1 week ago

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