Modeling Roads for Map Navigation
A navigation map is influenced by several road characteristics, such as the turn restrictions, improper way of road tracing and road classification. The most important ones among those are:
Roads are the main features that are used for rendering a route in all navigational applications. Correct road mapping leads not only to the well-looking map but also to better navigation experience. With the change in the shape of the traced road, the distance covered will be altered which affects the route. The common approach for road mapping is to trace roads following the center-line from satellite imagery.
Roads on satellite imagery
Road connectivity / topology:
If you want to travel from point A to point E as shown in the below image, you can either travel from
A to B, B to C and then C to E or
A to B, B to D and then D to E.
But, if you have a restriction to enter D from A, the only possible route will be
A to B, B to C and then C to E. This is where connectivity plays a major role in deciding the final route.
Road attributes / properties:
A to C is a primary road which is crossing through a service road
B to D and you want to travel from
A to E, the navigation map comes up with the route traveling from
A to B, B to C and then C to E and completely avoids
A to B, B to D and then D to E because the travel on Primary road is much efficient than a narrow service road. This is how the attributes / properties with which the road is assigned with plays a crucial role in deciding the final route.
OpenStreetMap data model:
The OpenStreetMap data model consists of nodes, ways, relations, and tags. A detailed description of the data model can be found in the The OpenStreetMap Data Model guide.
Navigation data is similarly a combination of nodes, ways, relations, and tags. Some of the examples are illustrated below:
- Exit numbers:
An way tagged with highway=secondary tag
- Turn restrictions are a combination of nodes, ways, tags, and relations. It consists of
to way, tied together by a
- Tags: All the navigation features are differentiated and defined based on how they are tagged. Tags can be on any element: on nodes, ways, and relations.
Before tracing, we need to inspect the start and endpoints of the road segment. We need to identify the road direction, general numbers of lanes and the places where there are extra lanes. Based on this we choose our strategy for tracing.
We are not able to draw a road on its center line, especially if roads join/fork or the number of lanes change. Imagine two roads which join: how would you draw the OSM-way around the point where the roads join?
Center line tracing
Tracing based on road direction
Tracing roads with more than two lanes
There are two cases:
Dual carriageway roads
These are bidirectional roads which have a physical separation between the lanes in both the directions. Both the ways will be counted for lanes and will be tagged with
lanes=*. Dual carriageways are always
Placement of nodes of the lines in each direction, opposite to each other
Roads which carry traffic in both directions (Bidirectional roads)
Road carrying traffic in both directions