Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Help] Real-time Traffic Signal Change #6806

Unanswered
Tejaswgupta asked this question in Q&A
Discussion options

I'm working on a personal project to develop a green-corridor for ambulances. The application would be able to give the most optimized route for the ambulance to get to the patient and back to the hospital. Let's assume we get the traffic light information from local authorities and maybe even the ability to change it. Calculating route might be easy but how do we switch the lights to green at the time this vehicle comes near the signal?

I'm pretty new with GIS , so just wanted to ask for someone pointers to know the feasibility of this and if it is then how to get started it.

You must be logged in to vote

Replies: 3 comments

Comment options

I think your specific ask:

how do we switch the lights to green at the time this vehicle comes near the signal

is way out of scope for this project.

Maybe start by reading this Wikipedia page that describes some of the mechanisms that are typically used.

https://en.wikipedia.org/wiki/Traffic_signal_preemption

You must be logged in to vote
0 replies
Comment options

Sure, thanks I'll check that out @danpat . On another note , could you also point me to any resource for integrating live traffic/historical data from traffic signals for creating diversions on congested routes. I've seen Valhalla have a blog but couldn't any code samples.

You must be logged in to vote
0 replies
Comment options

OSRM supports updating speeds on edges as a way to consider traffic data, see the wiki page here:

https://github.com/Project-OSRM/osrm-backend/wiki/Traffic

If you want to route around traffic lights and congestion, you'll need to find your own source of data, and use the mechanism described on the wiki page for importing it.

I will say, it seems pretty unreasonable to consider traffic lights for actual routing - light cycles are very short, and the error margin in most sources of traffic data is quite high. I do not think calculating routes to "hit all the green lights" is feasible with OSRM, nor with most sources of data that most of us have access to. Dynamic traffic light timings additionally make it highly unlikely any routing engine could magically send you the right way if your vehicle doesn't have a pre-emption system on board.

Most sources of traffic data implicitly include stop times due to lights in average travel speeds.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Converted from issue

This discussion was converted from issue #6754 on March 04, 2024 23:19.

AltStyle によって変換されたページ (->オリジナル) /