Routino : Tagging Rules


Tags And Attributes

The different tags and attributes in the OSM format XML that are used by Routino are described below.

An important change for version 1.4 of Routino is that the tags in the input file are first processed according to a set of rules defined in a configuration file. This means that the information presented here is in two parts; firstly the tags that are recognised by Routino after pre-processing and secondly the transformations in the default configuration file.

Tags Recognised After Processing

This section describes the tags that are recognised by Routino after the tag transformations have been applied. This is therefore a much reduced set of tags compared to the original OSM data and also includes tags which are specific to Routino.

In all cases of tag processing values of true, yes, 1 are recognised as being affirmative and any other value is ignored.

Node Tags And Attributes

None of the node tags are used but the node attributes id, latitude and longitude of the node. The id atribute is required to associate the node with the ways and the position attributes are required to locate the node.

Way Tags And Attributes

The tags from the ways in the data are the ones that provide most of the information for routing. The id attribute is used only so that the many segments associated with a way can be share a set of tags taken from the way.

The highway Tag

The most important tag that is used from a way is the highway tag. This defines the type of highway that the way represents. Any way that does not have a highway tag is discarded.

There are more highway types defined than are used by the router. The subset that the router uses are:

Note 1: This changed in version 1.3 of Routino - the bridleway and footway types were included within the path highway type.
Note 2: This changed in version 1.3 of Routino - the steps type was separated from the footway type.

Transport Specific Tags

One tag is recognised for each of the different modes of transport: foot, horse, bicycle, wheelchair, moped, motorbike, motorcar, goods, hgv and psv. These indicate whether the specific type of transport is allowed on the highway or not.

The name Tag

The name tag is used to provide the label for the highway when printing the results.

The ref Tag

The ref tag is used to provide the label for the highway when printing the results.

The junction Tag

The junction tag is used to check if a highway is (part of) a roundabout. This tag is used for information to label the highway if no other name is provided.

The multilane Tag

The multilane tag is used to identify whether a highway has multiple lanes for traffic and this sets one of the highway properties. There is not normally a multilane tag but one needs to be added by the tag processing transformations. Values of true, yes, 1 are recognised.

The paved Tag

The paved tag is used to identify whether a highway is paved or not, this is one of the available highway properties. A paved tag may exist in the original data but normally the surface tag needs to be transformed into the paved tag.

The bridge Tag

The bridge tag is used to identify whether a highway is a bridge and therefore set one of the available properties.

The tunnel Tag

The tunnel tag is used to identify whether a highway is a tunnel and therefore set one of the available properties.

The oneway Tag

The oneway tag is used to specify that traffic is only allowed to travel in one direction.

The maxspeed Tag

The maxspeed tag is used to specify the maximum speed limit on the highway; this is always measured in km/hr in OpenStreetMap data. If the tag value contains "mph" then it is assumed to be a value in those units and converted to km/hr.

The maxweight Tag

The maxweight tag is used to specify the maximum weight of any traffic on the way. In other words this must be set to the heaviest weight allowed on the way (for example a bridge) in tonnes. If the tag value contains "kg" then it is assumed that the value is in these units and converted to tonnes.

The maxheight Tag

The maxheight tag is used to specify the maximum height of any traffic on the way. In other words this must be set to the lowest height of anything above the way (like a bridge) in metres. If the tag value contains a measurement in feet or feet and inches then attempts are made to convert this to metres.

The maxwidth Tag

The maxwidth tag is used to specify the maximum width of any traffic on the way. This must be set to the minimum width of the contraints at the wayside in metres. If the tag value contains a measurement in feet or feet and inches then attempts are made to convert this to metres.

The maxlength Tag

The maxlength tag is used to specify the maximum length of any traffic on the way (usually from a traffic sign) in metres. If the tag value contains a measurement in feet or feet and inches then attempts are made to convert this to metres.

Relation Tags And Attributes

Currently no relation tags or attributes are used.

Tag Transformations

This section describes the set of tag transformations that are contained in the default configuration file. The configuration file tagging rules are applied in sequence and this section of the document is arranged in the same order.

Node Tag Transformations

No transformations are applicable since no node tags are recognised.

Way Tag Transformations

Highway Defaults

The first part of the tag transformations is to decide on defaults for each type of highway. This uses the highway tag in the OSM file and maps it into one of the highway tags that are recognised by Routino, defining the default allowed transport types and adding a number of properties.

The first part of the transformation is to convert the highway tag into one that is recognised by Routino.

Mapping of equivalent highway types
Original tag Transformed tag
bridleway path
byway track
footway path
living_street residential
minor unclassified
pedestrian path
road unclassified
services service
unsurfaced track
unpaved track
walkway path

The type of highway also determines the defaults for the types of transport allowed on the highway. The default assumptions are as shown in the table below.

Transport types on different highway types
Highway foot horse bicycle wheelchair moped motorbike motorcar goods hgv psv
motorway no no no no no yes yes yes yes yes
trunk no no no yes yes yes yes yes yes yes
primary yes yes yes yes yes yes yes yes yes yes
secondary yes yes yes yes yes yes yes yes yes yes
tertiary yes yes yes yes yes yes yes yes yes yes
unclassified yes yes yes yes yes yes yes yes yes yes
residential yes yes yes yes yes yes yes yes yes yes
service yes yes yes yes yes yes yes yes yes yes
track yes yes yes yes no no no no no no
cycleway yes no yes yes no no no no no no
path yes yes (1) yes yes (1) no no no no no no
steps yes no no no no no no no no no

Note 1: A path allows bicycle or horse access by default only if actually labelled as a highway of type "bridleway" or certain values of the designation tag (described below).

Finally for the highway tag a number of properties are added depending on the highway type.

Properties on different highway types
Highway Properties
motorway paved, oneway, multilane
trunk paved
primary paved
secondary paved
tertiary paved
unclassified paved
residential paved
service paved
track paved (1)
cycleway paved
path paved (2)
steps

Note 1: A track is paved only if it is tagged as tracktype=grade1.
Note 2: A path is paved only if it was originally tagged as highway=walkway or highway=pedestrian.

Generic Access Permissions

The access tag is used to specify the default access restrictions on the way. If the tag value is "no" or "private" then all transport types are denied access (later tag transformation rules may add specific transport types back again).

Other Access Permissions

A tag named vehicle means any of the bicycle, moped, motorbike, motorcar, goods, hgv and psv transport types. A tag named motor_vehicle is transformed to mean any vehicle except a bicycle.

The designation tag is used as an alternative method of identifying the legal right of way on a path (in the UK at least). The tag transformations convert these tags into a set of allowed transport types as shown below.

Aliasing of designation types
Designation tag Equivalent access permissions
bridleway or public_bridleway foot=yes, wheelchair=yes, horse=yes, bicycle=yes
restricted_byway foot=yes, wheelchair=yes, horse=yes, bicycle=yes
byway foot=yes, wheelchair=yes, horse=yes, bicycle=yes, moped=yes, motorbike=yes, motorcar=yes
footpath or public_footpath foot=yes, wheelchair=yes

Specific Access Permissions

The final part of the access permissions is to use the specific transport type tags.

One tag is recognised for each of the different modes of transport: foot, horse, bicycle, wheelchair, moped, motorbike, motorcar, goods, hgv and psv. These indicate whether the specific type of transport is allowed on the highway or not.

Highway Properties

If there is a surface tag then the highway is assumed to be unpaved unless the tag value matches one of the following: paved, asphalt or concrete.

Support for the obsolete paved tag is also provided and the highway is paved if this is set to a true value.

The lanes tag is used to identify whether a highway has multiple lanes for traffic or not (the number of lanes is not important in this case, only whether it is more than one) this sets one of the highway properties.

The bridge and tunnel tags are copied directly from the input to the output.

Highway Restrictions

The oneway, maxspeed, maxweight, maxheight, maxwidth and maxlength are copied directly from the input to the output without modification.

Highway Names and References

The name and ref tags are copied directly from the input to the output.

Relation Tag Transformations

No transformations are applicable since no relation tags are recognised.