Highway tag usage
From OpenStreetMap
There is conflicting information on this topic at several places. Please see Talk:Highway tag usage for discussion.
The highway tag is the primary tag used for highways. It is often the only tag. It is a very general and sometimes vague description of the physical structure of the highway.
While it is not as specific as other tags it is very useful because a section of highway can be given a value simply by looking at it. This allows a useful representation of the highway to be part of the map immediately until other data can be gathered. Also, the value of many other tags can be assumed based on the value of the highway tag in combination with other information such as other tags or the location, thereby reducing data entry.
Contents |
The highway tag represents physical attributes
While certain legal designations are used in the descriptions and some of the tags are the same as legal descriptions, e.g. trunk and motorway, the consensus is that the highway tag is for making a general description of the physical attributes of a highway. This gives the user of a highway more useful information than a legal classification. There are three main reasons for this.
First, it is assumed that the user of a highway wants to know the physical structure of the road. A driver wants to know if the road is a single lane or a four lane and not its funding source.
Second, it allows the same set of values to be applied in different legal jurisdictions to similar highways where the legal classification systems might be very different. A section of Autobahn in Germany, a section of US Interstate, and a city expressway can all be labeled as motorway.
Third, its faster than determining the legal status or funding source of a road. If a section of road in the US looks like a motorway then it can be tagged as a motorway without researching it's funding sources or driving up and down the road looking for an Interstate sign.
Here are two examples where the highway tag differs from the legal status:
- Some roads in the UK that were legally classified as trunk roads have been "detrunked" and are no longer designated by the government as trunk roads. These roads should still have the tag highway=trunk.
- A road which is legally designated as trunk road has a section where the road is not built to trunk standards, e.g. a single lane with passing areas. The section that is not built to trunk standards should be given a different value for highway other than trunk.
Exceptions to physical attributes
In some countries a road's other attributes are used in determining the highway tag value. In particular this is used where a very narrow road is expected by locals to be rendered at higher zoom levels.
In Iceland for example, the biggest connecting road in the country is mostly a two lane sealed road, but in some parts still a 1.5 lane unsealed road. It is still a "primary" road, though the unsealed portions are tagged as such.
The highway tag and legal access.
While some highway tags like cycleway and bridleway imply a particular kind of traffic other tags should be used to designate what traffic is legally allowed or may be appropriate.
Network and route systems.
The value of the highway tag should be applied without regard to network and route systems. In many countries a particular section of road may be part of many different routes in the same or different route networks, and a particular route may have sections with different attributes and therefore different highway tags. Refer to country specific guides for tagging routes and networks.
Colours used on maps for road classes
The colour in which roads will be displayed will depend on the rendering rules and this will vary from map to map. For example a UK based map (as most OSM renders are) may show motorways as blue lines, and USA based map may show these as orange to fit with local custom. Tags should be chosen to reflect the road class, not to select a preferred rendering colour.
Road Class Hierarchy
For the purpose of routing motorised vehicles, the following hierarchy will normally be used:
- Motorway
- Trunk
- Primary
- Secondary
- Tertiary/Residential
- Unclassified
- Service
Usage
| XML | Examples | Comments |
|---|---|---|
<tag k="highway" v="motorway"/>
| For restricted-access divided highways. For example Motorways (UK), Autobahns (D), Interstate highways (USA). See table below for international equivalents. | |
<tag k="highway" v="motorway_link"/>
| Linking roads to and from the motorway beyond the point where non-motorway traffic can join or leave the link or other roads where motorway rules apply. | |
<tag k="highway" v="trunk"/>
| For unrestricted-access divided highways and other inter regional routes that are not motorways. | |
<tag k="highway" v="trunk_link"/>
| For link-lanes to trunk roads from the point where traffic is required to join or leave a trunk road. In the case of a trunk road linking a trunk road to a motorway the link should be tagged as motorway_link. | |
<tag k="highway" v="primary"/>
| For primary roads, which are major routes. These may have traffic signals and side roads with direct access. For example "A road" (UK) | |
<tag k="highway" v="primary_link"/>
| For link-lanes to primary roads from the point where traffic is required to join or leave a primary road. In the case of a linking road to a higher class of road this section should be tagged using the higher class equivalent. | |
<tag k="highway" v="secondary"/>
| For secondary roads. One lane each direction, wide enough for 2 passenger cars. For example 2nd class (CH), B Road (UK) | |
<tag k="highway" v="tertiary"/>
| For tertiary roads, minor roads for through traffic. Larger than an "Unclassified" road. For example: C Road (UK) (albeit hard to identify, normally a minor road >4m wide and with white dashed lines down the centre). | |
<tag k="highway" v="unclassified"/>
| For the narrowest paved public highways. For example: 3rd class (CH), unclassified(UK). Note: The 'Unclassified' tag should not be used to tag roads where the road class has not been determined. For that case, use highway=unknown | |
<tag k="highway" v="residential"/>
| For residential streets that are not also tertiary, secondary or primary roads. Residential roads that are also higher class roads should be tagged as such with a 'abutters=residential' tag in addition. | |
<tag k="highway" v="bridleway"/>
| For designated bridleways | |
<tag k="highway" v="cycleway"/>
| For designated cycle paths | |
<tag k="highway" v="footway"/>
| For designated footpaths | |
<tag k="highway" v="steps"/>
| For flights of steps on footpaths and pedestrian routes |
International equivalence
Please check Key:highway#International_equivalence for a comparison on how the highway tag is used in different countries.
Users should consult the guide for the particular country for more details and additional tags. See Category:Projects for country specific projects and Tagging for list of country specific tagging guides.
See also
- Tagging samples/urban
- Tagging samples/out of town
- Mapping/Features/Road for ref tag conventions for highway numbers

