Proposal:Traffic Signals (inactive)

From OpenStreetMap Wiki
Jump to navigation Jump to search

Proposed features/Traffic Signals

Traffic Signals
Proposal status: Abandoned (inactive)
Proposed by: tw123
Applies to: node/way
Definition: This proposal covers the modelling of complex traffic light circuits with the introduction of a new relation and a small extension on the lane-tagging-features.
Draft started: 2013-06-17
RFC start: 2013-06-22

Abstract

This proposal covers the modelling of complex traffic light circuits with the introduction of a new relation and a small extension on the lane-tagging-features. The proposal is based on the implementation of certain requirements that can also be reviewed in this article. The main reason why it was issued is because currently there is no detailed approach for reflecting traffic lights in OpenStreetMap. With the tag highway=traffic_signals it can only be said, that on an intersection a traffic light exists in general. E.g. for simulation or navigation purposes the information base needs to be extended in a way that lane assignments can be made and traffic light phases are taken into account. Current discussions on this topic are often resulting in increasing the geometric complexity of intersections by mapping each lane individually. After doing some research it was clear that these kinds of solutions are not capable to cover the full range of the following requirements while preserving the simplicity of mapping intersections in OpenStreetMap.

Requirements

For evaluating different solutions it helped a lot to get back to the requirements that these solutions might address. Once having the full picture the requirements were forming the starting point to build this proposal.

All possible “physical” assignments between lanes and traffic lights can be captured

Most important for the relevance of a traffic light model is the ability to capture the relations between traffic lights and their surrounding environment. In a first step this environment can be broken down to the lanes that are arriving at the traffic light and are departing from it. In reality the following assignments are possible and should be also within the model:

  1. One traffic light can be assigned to multiple lanes
  2. One lane can be assigned to multiple traffic lights

Switching times and states can be defined per traffic light

As each traffic light might have individual switching times and states there should be a way to define them in OpenStreetMap. This is an important requirement with regards to many applications, e.g. simulators or navigation software, where OpenStreetMap-data is used.

Efficient mapping of intersections by cartographers possible

The OpenStreetMap-project relies on the participation of thousands of volunteers that are mapping the whole planet. Life should be very easy for them when it comes to the mapping of intersections and especially their corresponding traffic lights.

Simple technical evaluation by applications possible

The traffic light model might be used in simulations or routing algorithms. Therefore, there should be only one correct and easy way of interpreting the traffic light data. Nothing is worse than an abstract definition e.g. to which lane a traffic light is assigned to.

Downward compatibility

Any proposal made to this topic should not affect existing interpretations of traffic light-tags.

Proposal

For referring to a specific lane within the traffic light definition there needs to be an identifier for each lane. Therefore, a new ref:lanes-tag is suggested according to the syntax of other lane-tags such as turn:lanes etc. This means that the values for multiple lanes are separated by a | (vertical bar). A traffic light is defined as a relation of type traffic_signals. It has three relation members. First, the affected crossing node is added with the role signal. Then, in order to reveal which ways are assigned to this traffic light, the arriving one is associated with the role from and the departing one will use the role to. The big advantage of these assignment is that for example a routing algorithm is able to determine which traffic light is situated between the way x and y by only looking for traffic light-relations where both ways are members of. In addition to the relation members the following tags are proposed for modelling lane assignments and traffic signal phases:

Key Description Possible value
ref:lanes:from Referencing the affected lanes in the from-way 0|1
ref:lanes:to Referencing the affected lanes in the to-way 0|1|2
phases Determining traffic light states (g=green, y=yellow, r=red) g|y|r|r
timing Determining the duration of each state in seconds 31|4|31|4

With reference to the requirements above this approach delivers the flexibility to model multiple traffic lights per intersection. Each traffic light can be assigned to multiple lanes and also each lane can be controlled by multiple traffic lights. Furthermore, it is easy to evaluate for software algorithms which ways are affected by which traffic lights. Switching times and states can be maintained and it should be an efficient way of modelling even complex situations.

Example

The example demonstrates how a complex intersection can be defined following the proposal above. For a better understanding the images below are used to outline which (green) traffic light is represented by which relation. But first the basic node and way information:

Kreuzung 0.png
 <node id='-10' lat='0.0077665505290331486' lon='-0.020091583705445906' />
 <node id='-20' lat='0.007148958776435664' lon='-0.0193504735960473' />
 <node id='-30' lat='0.0064639933771318435' lon='-0.020170186292806362' />
 <node id='-40' lat='0.007160187717399615' lon='-0.020675488640123592' />
 <node id='-50' lat='0.007148958776435664' lon='-0.020125270528600386' />
 <way id='-1050'>
   <nd ref='-10' />
   <nd ref='-50' />
   <tag k='ref:lanes' v='0|1|2|3' />
 </way>
 <way id='-3050'>
   <nd ref='-50' />
   <nd ref='-30' />
   <tag k='ref:lanes' v='0|1|2|3' />
 </way>
 <way id='-2050'>
   <nd ref='-50' />
   <nd ref='-20' />
   <tag k='ref:lanes' v='0|1|2|3|4' />
 </way>
 <way id='-4050'>
   <nd ref='-40' />
   <nd ref='-50' />
   <tag k='ref:lanes' v='0|1|2|3|4' />
 </way>

After nodes and ways are defined they are now referred in the traffic light-relations below:

Kreuzung 1.png
 <relation id='-5'>
   <member type='way' ref='-4050' role='from' />
   <member type='way' ref='-2050' role='to' />
   <member type='node' ref='-50' role='signal' />
   <tag k='phases' v='g|y|r|r|r|r' />
   <tag k='ref:lanes:from' v='0|1' />
   <tag k='ref:lanes:to' v='0|1' />
   <tag k='timing' v='31|4|31|4|31|4' />
   <tag k='type' v='traffic_signals' />
 </relation>
 <relation id='-6'>
   <member type='way' ref='-4050' role='from' />
   <member type='way' ref='-3050' role='to' />
   <member type='node' ref='-50' role='signal' />
   <tag k='phases' v='g|y|r|r|r|r' />
   <tag k='ref:lanes:from' v='0' />
   <tag k='ref:lanes:to' v='0|1' />
   <tag k='timing' v='31|4|31|4|31|4' />
   <tag k='type' v='traffic_signals' />
 </relation>
 <relation id='-7'>
   <member type='way' ref='-2050' role='from' />
   <member type='way' ref='-1050' role='to' />
   <member type='node' ref='-50' role='signal' />
   <tag k='phases' v='g|y|r|r|r|r' />
   <tag k='ref:lanes:from' v='4' />
   <tag k='ref:lanes:to' v='2|3' />
   <tag k='timing' v='31|4|31|4|31|4' />
   <tag k='type' v='traffic_signals' />
 </relation>
 <relation id='-8'>
   <member type='way' ref='-2050' role='from' />
   <member type='way' ref='-4050' role='to' />
   <member type='node' ref='-50' role='signal' />
   <tag k='phases' v='g|y|r|r|r|r' />
   <tag k='ref:lanes:from' v='3|4' />
   <tag k='ref:lanes:to' v='2|3' />
   <tag k='timing' v='31|4|31|4|31|4' />
   <tag k='type' v='traffic_signals' />
 </relation>
 <relation id='-9'>
   <member type='way' ref='-2050' role='from' />
   <member type='way' ref='-3050' role='to' />
   <member type='node' ref='-50' role='signal' />
   <tag k='phases' v='g|g|g|y|r|r' />
   <tag k='ref:lanes:from' v='2' />
   <tag k='ref:lanes:to' v='0|1' />
   <tag k='timing' v='31|4|31|4|31|4' />
   <tag k='type' v='traffic_signals' />
 </relation>

Now the next few relations:

Kreuzung 2.png
 <relation id='-1'>
   <member type='way' ref='-3050' role='from' />
   <member type='way' ref='-2050' role='to' />
   <member type='node' ref='-50' role='signal' />
   <tag k='phases' v='r|r|g|g|g|y' />
   <tag k='ref:lanes:from' v='3' />
   <tag k='ref:lanes:to' v='0|1' />
   <tag k='timing' v='31|4|31|4|31|4' />
   <tag k='type' v='traffic_signals' />
 </relation>
 <relation id='-3'>
   <member type='way' ref='-1050' role='from' />
   <member type='way' ref='-4050' role='to' />
   <member type='node' ref='-50' role='signal' />
   <tag k='phases' v='r|r|g|g|g|y' />
   <tag k='ref:lanes:from' v='0|1' />
   <tag k='ref:lanes:to' v='2|3|4' />
   <tag k='timing' v='31|4|31|4|31|4' />
   <tag k='type' v='traffic_signals' />
 </relation>

And here are the final ones:

Kreuzung 3.png
 <relation id='-2'>
   <member type='way' ref='-3050' role='from' />
   <member type='way' ref='-1050' role='to' />
   <member type='node' ref='-50' role='signal' />
   <tag k='phases' v='r|r|r|r|g|y' />
   <tag k='ref:lanes:from' v='2|3' />
   <tag k='ref:lanes:to' v='2|3' />
   <tag k='timing' v='31|4|31|4|31|4' />
   <tag k='type' v='traffic_signals' />
 </relation>
 <relation id='-4'>
   <member type='way' ref='-1050' role='from' />
   <member type='way' ref='-3050' role='to' />
   <member type='node' ref='-50' role='signal' />
   <tag k='phases' v='r|r|r|r|g|y' />
   <tag k='ref:lanes:from' v='0|1' />
   <tag k='ref:lanes:to' v='0|1' />
   <tag k='timing' v='31|4|31|4|31|4' />
   <tag k='type' v='traffic_signals' />
 </relation>