Road Features Mapping Guide
Detailed guide mapping features for navigation on the OpenStreetMap project. Before you start, please read the guide on Mapping with OpenStreetMap
These are features that help the routing engine find the safest and fastest route between two points.
1. Functional Road Class
- OSM Wiki
Roads are categorized according to its order of importance. They are tagged with the
highway=*. The general order of importance for way types are:
highway= motorway > trunk > primary > secondary > ... > living streets > ... > footway
highway=primary in San Francisco
The value of the key helps show the importance of the highway within the road network as a whole. The importance ranges from the most important
motorway to the least important
service. The routing engine takes into account this importance of classification when determining optimum routes.
Road classification may varies from country to country. The country specific use cases can be found in detail on separate wiki pages. For example, when mapping roads in India, the local community refer to the India road tagging wiki.
For an example of an area with a good concentration of different classes of roads on OpenStreetMap, look at San Francisco area. This osm query can be used to extract and gather numbers of all the highways present in a given bounding box on OpenStreetMap.
- OSM Wiki
Oneways generally refer to road segments which allow traffic in only one direction. There are also streets which have oneway characteristics for only on certain times of the day to regulate traffic.
oneway=yes shown in Mapillary
The best source of mapping oneways are again street level photos.
type=restriction is added to a relation in OpenStreetMap which is used to describe turn restrictions at junctions. The relation has a set of tags that describes the type of restriction, for example.
no_u_turn, etc. These are traffic signs at junctions and this information must be present on the map to find the best route by the routing engine while planning a route.
Turn restriction denoting
no left turn along with conditions: opening and closing times
turn restriction which denotes
no right turn at the junction
4. Speed limits
- OSM Wiki
maxspeed=* tag defines the maximum legal speed limit for general traffic on a particular road, railway or waterway. The max speed values will be interpreted as kilometers per hour by default. The
maxspeed=* is an important part of routing as it is used in determining the shortest time taken by a specific route to reach a destination. In the case of two routes, the one with the shortest time (higher maxspeed) and shortest distance will be considered as the optimum route.
Maxspeed sign shown in Mapillary
- OSM Wiki
Apart from turn restrictions, there are access restrictions for different parts of highways. Some of these tags are
access=private etc which will end up altering the route to be taken during the journey. For more information on the various kinds of
access=* tags take a look at Key:access and Conditional restrictions and access restrictions
access=no for non-motorized traffic, ends up altering the route for bicycle profiles, source: US MUTDC
access=private tags on OpenStreetMap ways, which will not allow that segment of the way to be used in a route can be extracted from this overpass query. An example of well-mapped access restrictions in OpenStreetMap can be found in London.
The sources for mapping access restrictions in OpenStreetMap are: street view photos, local mapping drives.
6. Traffic signals
Traffic signals such as:
barrier=toll_booth as well as
traffic_calming=* are considered during routing. The
type=restriction more commonly referred to as turn restrictions are traffic signage which prohibits certain turns in intersections are also a crucial part of a great
More details on mapping
traffic signals for cars and pedestrians can be found in the OpenStreetMap wiki.
Street view photos from Mapillary, local mapping drives using OpenStreetMap tracker can be used as sources to map traffic signals in OpenStreetMap.
Traffic signal in a junction
1. Exit & destination signs
What are exit numbers?
- An exit number is a number assigned to a road junction, usually an exit from a freeway. It is usually marked on the same sign as the destinations of the exit, as well as a sign in the gore.
Different tags for exit numbers:
ref=*is used when the exit has a specific number assigned to it.
noref=yesis used when the exit doesn’t have any official number assigned to it.
What are destination tags?
- Destination tags describe the content of signposts or ground writing indicating the names of the locations that a certain exit from the freeway or a highway is heading to.
- The key
destination=*describes where a certain exit leads to. Thus navigation systems can refer to road signs that the driver actually sees.
Different tags for destinations:
destinationtag refers to the place that the way exiting from the freeway leads to.
destination:refis the reference of the roads directly ahead.
destination:ref:tois to specify the reference of a major highway ahead.
destination:streetrefers to the main street the way exiting from the freeway leads to.
An example of a place with good exit/destination coverage in OpenStreetMap is Ottawa, Canada. These overpass queries for destination and exit numbers can be used to extract exit/destination data from OpenStreetMap.
The detailed guide on adding exit and destination numbers can be followed for adding exit/destinations. This guide is specifically focused on North America (US/Canada) for now.
2. Turn Lanes
As discussed in
Modeling Roads for navigation page, there are two types of roads: unidirectional and bidirectional.
lanes=* tag is used to count the number of lanes in both these type of roads.
Forward means the direction in which the way is drawn in OpenStreetMap, while
backward means the opposite direction.
Example: highway=tertiary lanes=5 lanes:forward=3 lanes:backward=2
In the image below, the number of lanes is two -
lanes=2. Orange line is the center line of bidirectional way which is the main way direction. When the extra lane starts in a bidirectional way, that segment is tagged as
lanes:backward=1. Optionally, we specify placement of the lanes relative to the way.
The below image have two tagging variants:
lanes=2- 1 lane for each direction, or
lanes=3- denote middle lane for left turn as (:point_left: this is discussed)
highway=residential lanes=3 lanes:forward=1 lanes:backward=1 lanes:both_ways=1 turn:lanes:both_ways=left
IN case the number of lanes is even but numbers of lanes for each direction not equal. :point_down:
Turn lanes have an influence on the path finding and are one of the most vital components for proper guidance. Choosing the correct turn lane can have a big influence in navigation. Oftentimes, they only help to illustrate a turn better but other times, they are vitally important. In guidance, the aim is to provide a set of instructions, like keep right or keep left by describing the optimum route found by the routing algorithm to a driver.
How a driver views turn lanes from the car. For a single direction way, it will be tagged
turn:lanes=left|left;through while for a bidirectional way it will be tagged
turn:lanes:forward/turn:lanes:backward=left|left|through depending upon OpenStreetMap way direction
There are three turn lanes tags in OpenStreetMap:
turn:lanes=* turn:lanes:forward=* turn:lanes:backward=*
Turn lanes can be mapped from high-resolution satellite imagery sources and street level photos. An example of the high density turn lane area in OpenStreetMap is Los Angeles. This overpass query can be used to extract turn lanes data from OpenStreetMap
Mapping guide for mapping turn lanes: This is a detailed mapping guide for adding turn lanes in general with specific focus on the US. It will be updated as more and more countries are mapped for lane information in OpenStreetMap.
The other important attributes in besides
exit/destination data required to provide the better guidance using OpenStreetMap data are:
lanes=* name=* ref=* relation:route