|Used to describe routes of various kinds.|
|Status: de facto|
|Tools for this tag|
A route is a customary or regular line of passage or travel, often predetermined and publicized. Routes consist of paths taken repeatedly by people and vehicles: a ship on the North Atlantic route, a car on a numbered road, a bus on its route or a cyclist on a national route.
A route (or variant) may belong to a route master relation. A route master contains all the directions, variant routes and information for that route. It permits OSM to distinguish the two routes of a two-way trip.
Note that a road sometimes has more than one number. Numerous major European "E" routes share ways (sometimes exactly the same ways) with national numbered routes.
- 1 Tags
- 2 Members
- 3 Route types (route)
- 4 How to map
- 5 Step by step guide
- 6 Navigation on relation:route
- 7 Related proposals
- 8 Notes
- 9 Helping tools
|type||Required||route||Indicates this relation represents a route.|
|route||Required||road / bicycle / foot / hiking / bus / trolleybus / ferry / detour / train / tram / mtb (mountainbike) / horse / ski / snowmobile / inline_skates /||A road (e.g., the ways making up the A7 auto route), bicycle route, hiking route or whatever route (see also #Route types (route)).|
|name||Important||A name||The route is known by this name (e.g., Jubilee Cycle Route, Pembrokeshire Coastal Path).|
|ref||Important||A reference||The reference by which this route is known; e.g., A7, NCN 11, Citi 4. Recommended if no parent relation route_master=* exists. Otherwise, it is optional.|
|network||Important||ncn / rcn / lcn / nwn / rwn / …||A wider network of routes of which this is one example. For example, the UK's national cycle network or a local cycle network.|
|operator||Optional||Operator name||The route is operated by this authority, company, etc; e.g., Stagecoach Cambridge, Eurostar.|
|state||Optional||proposed / alternate / temporary / connection||Sometimes routes may not be permanent (i.e., diversions), or may be in a proposed state (e.g., UK NCN routes are sometimes not official routes pending some negotiation or development). Connection is used for routes linking two different routes or linking a route with for example a village centre.|
|symbol||Optional||Symbol description||Describes the symbol that is used to mark the way along the route; e.g., Red cross on white ground for the Frankenweg in Franconia, Germany.|
|colour||Optional||A color name or a hex triplet||Colour code noted in hex triplet format. Especially useful for public transport routes. Example: #008080 for teal colour.|
|description||Optional||A short description||What is special about this route.|
|distance||Optional||Distance||The nominal distance covered by the route. For users' information and automatic evaluation; e.g., of completeness. The default unit is km. Use dot as decimal separator. If a unit is specified, it should be separated from the number by a space and use a value as described on the Units page.|
|ascent||Optional||Ascent||The ascent covered by a route (default units are metres; specify others explicitly). If a route has start and end point at different altitude use descent too.|
|descent||Optional||Descent||The descent covered by a route (default units are metres; specify others explicitly). Use it only if it differs from the ascent (different altitude at start/endpoint of a route).|
|roundtrip||Optional||yes/no||Whether or not the route start and ends at the same place; i.e., after traversing the route once, one is has returned to the start.|
|interval||Optional||The time between departures of any given stop on a public transport route.||This tag should only be used on public transport routes. Use HH:MM:SS, H:MM:SS, HH:MM, H:MM, MM, or M format. Example: interval=00:12:30 can be added to a subway route that runs trains every 12.5 minutes.|
|duration||Optional||The duration time between the first and the last stop on a public transport route.||This tag should only be used on public transport routes. Use HH:MM:SS, H:MM:SS, HH:MM, H:MM, MM, or M format. Example: duration=00:42 can be added to a subway route that take 42 minutes from start to end.|
This is an overview over all kind of roles. It is not reasonable to add them all to a certain relation, as some of them are used on certain types only (|
|<empty>||1+||The ways making up the route.
Currently the empty role should be used instead of the route role, which was used sometimes with PTv1.
|forward/backward||0+||If a route should be followed in only one direction for some or all of its length, the role can indicate this for some or all of the constituent ways. forward means the route follows this way only in the direction of the way, and backward means the route runs only against the direction of the way. Rendered on the cycle map (example).
These roles should not be used anymore on public transport routes (use empty role instead).
|north/south/east/west||0+||In North America, numbered route signs include a posted travel direction (north, south, east, west) that should be conveyed in the route's relation.|
|hail_and_ride||0+||This role should only be used on public transport routes.
Used on road segments in a public transport route relation where you can stop a vehicle at any point to get on or off. Common in asian countries.
|reverse||0+||On some roads , a bus has to reverse its way out of cul-de-sac. To reflect this in a route relation, use this role on a road segment.
This role should not be used anymore on public transport routes (put the way in the route relation twice instead).
|link||0+||Link roads (highway=*_link) from and to the route. See highway=motorway_link.|
|stop||0+||This role should only be used on public transport routes.
A bus stop or train halt/station, on the route road . The order of the members in the relation should be identical to the order in the timetable. Currently the stop role should be used instead of the stop:<number>, forward:stop:<number>, backward:stop:<number>, forward:stop, backward:stop roles, which were used sometimes with PTv1 to help mappers finding missing or misplaced stops.
|platform||0+||This role should only be used on public transport routes.
A bus or train platform belonging to the route. The order of the members in the relation should be identical to the order of the stops in the timetable. Currently the platform role should be used instead of the platform:<number> role, which was used sometimes with PTv1 to help mappers finding missing or misplaced platforms.
|guidepost||0+||A guidepost which refers the route. See information=guidepost.|
|*||All commonly used values according to Taginfo|
Route types (route)
|route||bicycle||Cycle routes explains how to tag cycle routes.|
|route||bus||The route a public bus service takes. See Buses.|
|route||canoe||Route for canoeing through a waterway.|
|route||evacuation||Emergency evacuation routes, with direction, for various types of emergencies.|
|route||detour||Route for fixed detour routes. Examples are Bedarfsumleitung in Germany and uitwijkroute in the Netherlands|
|route||ferry||The route a ferry takes from terminal to terminal Please make sure to add at least one node per tile (zoom level 12), better at least one every few km, so offline editors catch it with bbox requests.|
|route||fitness_trail||Fitness trails consist of a path or course equipped with obstacles or stations distributed along its length for exercising the human body.|
|route||hiking||Hiking explains how to tag hiking routes.|
|route||inline_skates||Inline has more information on the subject.|
|route||light_rail||Route of a light rail line.|
|route||motorboat||Signed motorboat routes.|
|route||mtb||Mountain biking explains how to tag mtb routes.|
|route||nordic_walking||For nordic walking routes.|
|route||pipeline||For pipelines, pipeline markers, and pipeline stations.|
|route||piste||Route of a piste (e.g., snowshoe or XC-Ski trails) in a winter sport area.|
|route||power||Where power lines use the same towers (the same way).|
|route||railway||A sequence of railway ways, often named (e.g., Channel Tunnel). See Railways.|
|route||road||Can be used to map various road routes/long roads.|
|route||running||For running (jogging) routes.|
|route||ski||For ski tracks (e.g., XC-Ski Trails User:Langläufer/Loipemap).|
|route||train||Train services (e.g., London-Paris Eurostar) See Railways.|
|route||tram||See Trams for more information on tagging tram services.|
|route||User defined||All commonly used values according to Taginfo.|
This table is a wiki template with a default description in English. Editable here.
Public transport routes
- Main article: Public transport
All public transport relations feature some combination of the following keys:
As Public transport is a rather complex and disputed topic in OpenStreetMap, this page is limited to the bare minimum, which also helps with keeping this up to date and avoids conflicting content in the wiki.
|road||e-road||European E-road network|
|road||US:I||Interstate Highways Relations, USA|
|road||US:US||United States Numbered Highway Relations, USA|
|road||US:xx||State highways in the United States, where xx is the state's postal abbreviation. Many states also have county route networks, and some have several tiers of state-owned roads.|
|road||ca_transcanada||Canadian Trans-Canada highways|
|road||ca_on_primary||Ontario primary highways|
|road||pl:national||Polish Road Network - national roads|
|road||by:national ||Belarusian Road Network - national roads|
|road||ro:DN||Romanian Road Network - national roads|
|road||AR:national||Argentine national roads|
|road||AR:provincial||Argentine provincial roads|
|road||ru:national||Автодороги России - national roads|
|road||BR||Brazilian Federal Highways|
|road||BR:xx||Brazilian state highways, where xx is replaced by a state code (RJ = Rio de Janeiro, MG = Minas Gerais, etc.)|
|road||bg:national||Bulgarian Road Network - national roads|
|road||gr:national||Greek national roads|
|road||gr:provincial:nn||Greek provincial roads, where nn is the prefecture's ISO code.|
|road||HK||Hong Kong Strategic Routes|
|road||JP:national||Japanese national roads|
|road||JP:prefectural||Japanese prefectural roads|
|road||ph:nhn||Philippine national highway network|
|road||ua:national||Ukrainian national roads|
|road||za:national||South African national roads|
|road||za:regional||South African regional roads|
|road||VE:T:xx||"Troncal" roads in Venezuela, where xx is the state's name abbreviation, according to the INTT's standard|
|road||VE:L:xx||"Local" roads in Venezuela, where xx is the state's name abbreviation, according to the INTT's standard|
|road||VE:R:xx||"Ramal" roads in Venezuela, where xx is the state's name abbreviation, according to the INTT's standard|
|detour||Local detours (used in the Netherlands and Germany). Detours are routes that avoid traffic jams on motorways, usually leading from one exit to the next.|
Cycle routes (also mountain bike)
- Main article: Cycle routes
|route||Required||bicycle / mtb||Use "bicycle" or "mtb", but not "bicycle/mtb"|
|network|| for route=bicycle
for route=mtb Optional
|Specify the network as a international route, national route, a regional route or a local route, as per the normal tagging of cycle routes|
|icn||International cycling network: long distance routes used for cycling routes that cross continents.|
|ncn||National cycling network: long distance routes used for cycling routes that cross countries.|
Regional cycling network: used for cycling routes that cross regions.
In Belgium and the Netherlands this is used for the cycle node networks.
|lcn||Local cycling network: used for small local cycling routes. Could be touristic loops or routes crossing a city.|
|ref||Optional||Reference||References work best on the map if just the number is used, so for NCN 4: 4. The network tag correctly distinguishes the type, so just use ref and not ncn_ref or similar.|
|state||Optional||Proposed. Routes are sometimes not official routes, pending some negotiation or development. Maps may choose to render these routes differently; e.g., as dotted lines.|
Some examples in use:
Walking routes (also hiking and pilgrimage)
- Main article: Walking Routes
Hiking routes are rendered for selected areas in Germany in a hiking and trail riding map (German). The tags required for rendering are:
|route||Required||hiking||Typically longer or more strenuous routes, usually on unpaved paths.|
|foot||Typically easier routes, usually on paved surfaces.|
|network||Required||iwn||International walking network: long distance paths used for walking routes that cross several countries, for example the Camino de Santiago|
|nwn||National walking network: long distance paths used for walking routes that cross countries|
Regional walking network: used for walking routes that cross regions.
In Belgium and the Netherlands this tag is used for the walking node networks
|lwn||Local walking network: used for small local walking routes. Could be touristic loops or routes crossing a city|
|name||Important||Meaningful route name suitable for identifying this route.|
|symbol||Optional||Verbal description of the route marker symbols.|
|osmc:symbol||Optional||Coded description of the route marker symbols.|
|pilgrimage||Optional||yes / no||Whether the route is used for pilgrimage. This qualifies the use of a hiking/foot route; as opposed to creating a new route type with route=pilgrimage.|
Inline skating routes
- Main article: Inline skating
|network||Required||international / national / regional / local||Specify the network as a international route, national route, a regional route, or a local route|
|ref||Optional||Reference||References work best on the map if just the number is used, so for national 4: 4. The network tag correctly distinguishes the type, so just use ref.|
|state||Optional||Proposed. Routes are sometimes not official routes pending some negotiation or development; the map renders these routes as dotted.|
Some examples in use:
This is a table with possible route tags being used right now:
|fitness_trail||For a fitness trail with extra exercise stations|
|horse||See also riding|
|inline_skates||Inline skate routes are named or numbered or otherwise signed routes for inline skating.|
|running||Used for marked running routes, usually 2–20km, that are used for exercise|
|snowmobile||For snowmobile routes. Either between two destinations or a collection of routes operated by someone|
|taxi||See also: route=share_taxi|
|cycling||Used for cycling events (like stages of the Tour de France). For (recreational) cyclenetwork use bicycle|
|historic||Historic routes, such as horse-pack trails used for postal routes, ancient roads, etc. Often parts are lost. Please include an appropriate historic=*-value.|
|motorcycle||Used for motorcycling events (motorcycle rally, guided tours)|
|transhumance||For long distance livestock paths|
|worship||A route along which fixed points of worship are placed, e.g. a via Crucis.|
How to map
Multiple routes sharing the same ways
Especially with bicycle routes, often multiple routes run along the same ways for a far distance. There exist so many different bicycle route networks that are operated by different entities that it is not unusual that some of these networks overlap. The EuroVelo routes, for example, use the existing infrastructure in many countries. There are two practices at the moment, if segments of multiple routes share the same way.
- Add the ways to all relations of the routes that they belong to.
- Split the routes into part relations and make super relations (relations that don’t contain ways but instead other relations). Then add the segment that is shared by the routes to all of them.
Both practices each have advantages and disadvantages.
Adding the ways to multiple route relations
- When many routes share one path, it can be a lot of work to map a new part of the route, because you have to add the ways to all relations.
- People might not see that the path also is used by other routes and might forget to apply their changes to all relations. Thus the data may become inconsistent.
- This is probably the easier way, as it is somewhat hard for beginners to split relations into parts and to find out which part they have to edit.
- If you don’t use super relations at all, you also have to add alternative routes and excursions to your relation. This makes it hard for analyzers and tools to understand the route. Role=excursion and role=alternative have been suggested, but they still don’t say which way belongs to which excursion (if there are multiple ones).
- It is the purpose of relations to group objects. When two primary roads share the same street at some section, we don’t create two ways that share the same nodes. So we shouldn’t create two relations that share the same ways.
Creating super-relations for routes
- Current renderers (like the CycleMap) don’t support super-relations, so they don’t show the ref and the network tag of a super-relation. Currently, all these tags have to be added to all part relations, which is a lot of work (especially as the parts need to have the different refs of all the routes they belong to).
- It is said to be good mapping practice to keep relations one way. So alternative routes and excursions need to be put into a different relation. So you often need a super-relation even without splitting the route into parts.
- Tools and analyzers (like the OSM Relation Analyzer, especially the GPX export function) don’t support super-relations yet. This makes it hard to analyze a route as a whole (which is important, for example, to calculate how much of a route already has been mapped). (Note: OSM Route Manager supports subrelations)
- There is no documented convention on how to handle super-relations. On first glance it appears simple--just take over all tags to all members--but it is not. There are tags where this makes no sense or which change the context and meaning when handed over to a member relation; e.g., distance or note. The same applies to roles other than in base relation, e.g. forward/backward.
- Super-relations can become very confusing when a relation belongs to multiple super-relations or a way belongs to multiple relations. In that case it is no longer deterministic from which relation a certain relation or way will receive its tags.
- When someone maps a new route, they might have to split other routes that share ways with it. People editing these other routes might get confused when the number of subrelations keeps changing the whole time.
- Current editors miss advanced relation editing features, such as “Split relation” (and also super-relation rendering). Things can get very confusing when one route consists of hundreds of small part relations.
- One motto of OSM is "Don't map for the renderers". If it is considered the more natural way of mapping to create super-relations, then the missing support in the renderers and tools should not stop us from doing so.
- Consider that super-relations are not necessarily included when requesting a set of data from the server. So depending on whether or not super-relations were included, the data is interpreted differently. As you cannot tell from a way or relation whether it is member of another relation, you never are quite sure whether you are seeing all the relevant data.
- It is common sense to create super-relations if one complete route is part of another route (like the German D6 is with EuroVelo EV6). If EV6 now shares only a part of another way in another country, we will have to create segments anyway (else we end up with a relation that contains both sub-relations and ways). We should either use the one method or the other.
- People need to know only the route that they are mapping. When someone maps the German D6 route, he doesn’t even need to know the EuroVelo network (as EV signs might not exist in his area), because, as with a super-relation, his part of the route gets added automatically to all parent relations. This fits the OSM concept better: When everyone maps the places and things he knows, a complete map of the world evolves.
At the moment it seems to be practice to create part-relations, if the shared segment is relatively big compared to the total length of a route. For a national bicycle route, 20 km might be a good limit. For shorter parts the single ways might be added to all relations they belong to. (Of course this is only a rule of thumb. Nothing of this is the official way of mapping.) It also might be important how many different way objects a segment consists of in OSM. It might be not very useful to create segments, if the route consists of motorways (as they only contain of a few, long ways), while bicycle routes often go through cities and residential areas where many ways would have to be added if there were multiple relations.
Another point when deciding which tagging method to use is to find out if the routes use the same ways only by coincidence. Thus, if one route is changed, the other route likely still will be using the old way, so using part-relations would not be appropriate.
Common practice is not to create route relations with more than 250–300 members. If you need to create bigger relations, which could happen easily, make several reasonable-sized relations and unite them in a super-relation as mentioned above. Reasons:
- Keep the relations editable.
- Avoid conflicts. The bigger the relation the more likely it is that two users are working on it at the same time.
- Save the server resources.
There is also a list of Monster Relations.
Bus routes and roundabouts
Bus routes passing through roundabouts are mapped in one of these two ways:
- The whole roundabout is included in the route relation.
- The roundabout is split and the part used by the bus route is included in the route relation.
There is no consensus among the OSM community regarding which method is recommended. The choice of method 1 or 2 has no effect on Garmin devices because split roundabouts are re-joined by mkgmap. It is also possible to re-join split roundabouts in Mapnik although this is not done for the rendering of the main map. Software developers should note that if the precise route is required and method 1 has been used, the details will need to be deduced from the positions of the entry to, and the exit from the roundabout; and also from the position of a stop, if the bus serves a stop on the roundabout. (In some cases a bus may make more than one full circuit of a roundabout.)
For many route relations, members order matters. For instance, an unordered hiking route relation would have a pretty useless, unreadable elevation graph:
In addition, data consumers may not be able to understand the path to be followed: one way, then another kilometers away, then back to the end of the first way…
Users editing routes should consequently try to keep them ordered if they are, or order them if they are not. A good hint, for JOSM, is to look at the last column of the members section of the relation editor: if this column has arrows in only one direction, and has no red points between members, then the members are ordered.
On the other hand, unordered relation members make this column display arrows in both directions, isolated members – segments without arrow and with 2 red dots –, and many red dots at continuity breaks.
Step by step guide
How to create a new route (it is slightly different if you want to add ways to an existing route).
- Ensure all ways that the route runs along exist and are appropriately tagged (e.g., highway=footway)
- Select the first way and click on the second symbol on the right side, which looks like two chain segments.
- Select a relation from the drop-down menu, if there is an existing relation in this area that is appropriate. If the existing relation you want to choose is far away, use the search function. Otherwise, select Create a new relation and click Add.
- Add a type tag with the value route.
- Add additional tags as needed. (Use the + button)
- Click OK.
- The relation has been added to the way. The grey box to the right of the relation details and to the left of the X is the input field for the way's role within the relation. See the Members section above for details of roles within the route relation type.
- Repeat steps 2–4, selecting the appropriate relation (the one just created) in step 3.
- Ensure all ways along which the route runs exist and are appropriately tagged (e.g., highway=footway)
- Make sure the relation pane (
Alt+Shift+R) is open
Newin the relation pane to create a new relation
- Fill in the appropriate tags in the dialog that pops up, adding at least type=route and preferrably name as well with a name for the route
- Now select some or all of the ways you would like to add to the relation using the normal select (
S) tool, then click
Editin the relation pane with your relation highlighted. The relation editing dialog will pop up
Add selectionin the relation dialog to add the selected ways to the relation.
Please list applications here that are able to navigate on an existing relation:route.
- cycle.travel uses route relations (of type=bicycle and type=road) to influence weighting for route selection.
- Proposed_features/via_ferrata proposes a relation of type=route, route=ferrata
- on Wikipedia.
- OSM Relation Analyzer (possible to search for relations by name)
- OSM Route Manager
- Hikingbook.pl automatically creates route descriptions and maps, as well as POI directory
- Rel2gpx exporter