Relation:route: Difference between revisions

From OpenStreetMap Wiki
Jump to navigation Jump to search
Content deleted Content added
Joto (talk | contribs)
Malenki (talk | contribs)
added Size
Line 585: Line 585:
Another point to decide which tagging method to use is to find out if the routes only use the same ways ''by coincidence''. Thus, if in the case that one route is changed, the other route will likely still be using the old way, using part-relations would not be appropriate.
Another point to decide which tagging method to use is to find out if the routes only use the same ways ''by coincidence''. Thus, if in the case that one route is changed, the other route will likely still be using the old way, using part-relations would not be appropriate.


=== Size ===

Common practice is not to create route relations with more then 250-300 members. If you need to create bigger relations - which could easily happen - 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 work on it at the same time.
*Save ressources on the side of the servers.

There is also a list of [[Relation:route/Monster_Relations|Monster_Relations]].
==Notes==
==Notes==
<references />
<references />

Revision as of 19:23, 30 January 2012

route
frameless|center|200px
Description
Used for a set of tags and members marking a route of various kind. Edit this description in the wiki page. Edit this description in the data item.
Group: Route
Members

  • way - (blank)
  • way - forward
  • way - backward
  • node - stop:<number>
  • node - stop
  • node - forward:stop:<number>
  • node - forward:stop
  • node - backward:stop:<number>
  • node - backward:stop
  • node way area - platform:<number>
  • node way area - platform
Useful combination
See also
Status: de facto

A route is a customary or regular line of passage or travel, often pre-determined and publicised. They consist of paths taken repeatedly by various people and vehicles: a ship on the North Atlantic Route, a car on a Numbered Road, a bus on its respective route or cyclist on a national route.

Paths are often shared by different modes of transport and therefore routes often overlap. In OSM a way can be assigned a number of different route relations allowing this overlap.

Note that a road sometimes has more than one number - numerous major European "E" routes share ways (maybe even exactly the same ways in some cases) with national numbered routes.


Rendered Cycle routes following this scheme
Rendered tram and Bus routes following this scheme
Rendered Walking Routes following this scheme

Tags

Key Value Explanation
type route indicates this Relation represents a route
route road / bicycle / foot / hiking / bus / ferry / detour / train / tram / mtb (mountainbike) / horse / ski / snowmobile a road (e.g. the ways making up the A14 trunk road), bicycle route, hiking route or whatever route (see also #List_of_route_types_in_use)
name a name The route is known by this name (e.g. "Jubilee Cycle Route", "Pembrokeshire Coastal Path")
ref a reference The route is known by this reference (e.g. "A14", "NCN 11", "Citi 4" (bus number))
network 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 operator name The route is operated by this authority/company etc. e.g. "Stagecoach Cambridge", "Eurostar"
state proposed / alternate / temporary / connection Sometimes routes may not be permanent (ie: diversions), or may be in a proposed state (ie: 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 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 a hex triplet (optional) Colour code noted in hex triplet format. Especially useful for public transport routes. Example: "#008080" for teal colour
description a short description What is special about this route
distance distance (optional) The distance covered by this route, if known. For information of users and automatic evaluation e.g. of completeness. Given including a unit and with a dot for decimals. (e.g. "12.5km")
ascent ascent (optional) The ascent covered by a route in meters (for other units use e.g. 600feet). If a route has start and end point at different altitude use descent too
descent descent (optional) The descent covered by a route in meters(for other units use e.g. 100feet). Use it only if it differs from the ascent (different altitude at start/endpoint of a route).
roundtrip yes/no (optional) Use roundtrip=no to indicate that a route goes from A to B and instead of being circular (roundtrip=yes).

Members

Way or Node Role Recurrence? Discussion
way (blank)/route zero or more the ways making up the route.
way forward/backward zero or more if a route should only be followed in 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).
way north/south/east/west zero or more in North America road are signed with their orientation
way link zero or more Link roads (highway=*_link) from and to the route. See highway=motorway_link!
node stop:<number> zero or more A Bus stop or train halt, on the route. The order of the members in the relation should identical to the order in the timetable. The number is not needed to preserve order of stops. It is only a guide to help mappers finding missing or misplaced stops. You can use role=stop instead if you like.
node stop zero or more A Bus stop or train halt/station, on the route. The order of the members in the relation should identical to the order in the timetable.
node forward:stop:<number>
backward:stop:<number>
zero or more A Bus stop or train halt, on the route, which is only be used in one direction. The direction is related to the direction of the way, nothing to do with towards/away from any bus station or terminus. The order of the members in the relation should identical to the order in the timetable. The number is not needed to preserve order of stops. It is only a guide to help mappers finding missing or misplaced stops. You can use role=forward:stop/backward:stop instead if you like.
node forward:stop
backward:stop
zero or more A Bus stop or train halt, on the route, which is only be used in one direction. The direction is related to the direction of the way, nothing to do with towards/away from any bus station or terminus. The order of the members in the relation should identical to the order in the timetable.
node way area platform:<number> zero or more A Bus or train platform, belonging to route. The order of the members in the relation should identical to the order of the stops in the timetable. The number is not needed to preserve order of platforms. It is only a guide to help mappers finding missing or misplaced platforms. You can use role=platform instead if you like.
node way area platform zero or more A Bus or train platform, belonging to the route. The order of the members in the relation should identical to the order of the stops in the timetable.

Route Relations in Use

Public Transport Routes

Bus Routes (also trolley bus)

Main article: Buses
Key Value Comment
type route (mandatory)
route bus
trolleybus
share_taxi
(mandatory)
ref Reference The number by which the route is known to the public: 4, 4A, X13, IR 3114 etc (recommended)
operator operator Name of the company that operates the route e.g. Deutsche Bahn AG, Connex, Interconnex usw.
name Individual Name The name of the route or line e.g. "Orient Express" "Thalys" (optional)
network local/ regional network Name (Abbr.) of the network e.g. BVG, RMV (optional)
wheelchair yes / no / limited Indicates if the buses on the route are equipped with ramps or elevators for wheelchairs. (optional)
colour ex: red / #FFEEDD The "official" colour for the bus route. identifiers in some cities. (optional)


öpnvkarte and openstreetbrowser.org render public transportation routes.

Some examples in use:

  • relation Bus route 82 in Quebec City, Canada please note that since API 0.6 - unlike this example shows - stop members (bus stops) do not have to be numbered, you can simply order them in the editor

Railway routes (light rail, metro, mainline, monorail, etc.)

Main article: Railway

Railway routes can both be used to describe a particular part of the infrastructure that known by a distinct name (for example East Coast Main Line) or for a railway service which is identified to the public with a particular identifier or name (such as the Orient Express). Discussion on tagging for different purposes is taking place on talk transit (Aug09).

Key Value Comment
type route
route train
subway
ref Reference The number of the line e.g. IR 3114
operator operator Name of the company that operates the route e.g. Deutsche Bahn AG, Connex, Interconnex usw.
name Individual Name Only if there is a special name of the route or line e.g. "Orient Express" "Hammersmith and City" (optional)
network local/ regional network Name (Abbr.) of the network e.g. BVG, RMV (optional)
wheelchair yes / no / limited If the trains on the route are equipped with ramps or elevators for wheelchairs. Note that even if the trains are that the not all stations on the route may be suitable, or not all platforms may be accessible (optional)
colour ex: red / #FFEEDD If the railway route has an "official" colour, for example metro lines in some cities. (optional)

Route relations could also be used to designate railway lines that are operated by one (perhaps more) train operators. Some examples can be found at Open Rail Map/NL.

öpnvkarte and openstreetbrowser.org render public transportation routes.

Some examples in use:

Tram routes

Main article: Trams
Key Value Comment
type route
route tram
ref Reference The number of the line e.g. IR 3114
operator operator Name of the company that operates the route e.g. Deutsche Bahn AG, Connex, Interconnex usw.
name Individual Name Common name "Orient Express" "Thalys" (optional); "Line 4" is not a name but a ref, so ref=4 should be used
network local/ regional network Name (Abbr.) of the network e.g. BVG, RMV (optional)
wheelchair yes / no / limited If the trams on the route are equipped with ramps or elevators for wheelchairs.
colour ex: red / #FFEEDD The tram, subways and buses might have "official" colour identifiers in some cities.

öpnvkarte and openstreetbrowser.org render public transportation routes.

Some examples:


Other Routes

Road Routes

route network Description
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 BAB German Autobahn
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 [1] Belarusian Road Network - national roads
road BR Brazilian Federail Highways
road BR:xx Brazilian state highways, where xx is replaced by state code (RJ = Rio de Janeiro, MG = Minas Gerais, etc.)
road bg:national Bulgarian Road Network - national roads
road ja:national Japanese national roads
road ja:prefectural Japanese prefectural roads
road za:national South African national roads
road za:regional South African regional roads
road na:national Namibian national roads


Some examples in use:

  • Please add here...

Cycle routes (also mountain bike)

Main article: Cycle routes

Cycle routes are extensively mapped with route relations, and the OSM cycle map will render route relations following this proposal.

In general it is probably a good idea to add the tags: "type => route" and "route => bicycle" (or "route => mtb"). However, the cycle map will still render a route if they are not present.

The following tags are used in rendering:

Key Value Comment
network icn / ncn / rcn / lcn Specify the network as a international route, national route, a regional route, or a local route, as per the normal tagging of cycle routes
ref a reference (optional) 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 proposed (optional) Routes are sometimes not official routes pending some negotiation or development -- the map renders these routes dotted.


route network Description
bicycle icn International cycling network: long distance routes used for cycling routes that cross continents
bicycle ncn National cycling network: long distance routes used for cycling routes that cross countries
bicycle rcn Regional cycling network: used for cycling routes that cross regions

In Belgium and the Netherlands this is used for the cycle node networks

bicycle lcn Local cycling network: used for small local cycling routes. Could be touristic loops or routes crossing a city


Some examples in use:

An international cycling map created from OSM data is available, provided by Andy Allan. The map rendering is still being improved, the data are updated every few days. It shows National Cycle Network cycle routes, other regional and local routes, and other cycling-specific features, such as:
  • dedicated cycle tracks and lanes
  • contours and hill colouring
  • bicycle parking
  • bike shops, toilets, drinking fountains, even pubs!
  • proposed bike routes (or numbering protocols), contrasted with the Lonvia map, below, which does not show proposed routes, but actual routes only

http://www.opencyclemap.org/

CyclOSM A free cycle-oriented map with more features than OpenCycleMap. See its wiki page CyclOSM.
Waymarked Trails: Cycling by Sarah Hoffman is a layer superimposed over mapnik (Standard Map Layer) which shows marked cycle routes around the world. Updated minutely, it renders actual routes without the state=proposed tag. Therefore no proposed routes (or proposed numbering protocols) are displayed.

Walking routes (also hiking and pilgrimage)

Main article: Walking Routes

Hiking routes are extensively mapped with route relations, and the Lonvia map will render route relations following this proposal and the osmc:symbol=*

Instead of the tag route=hiking there is less frequently also used route=foot.

Hiking routes are rendered for selected areas in Germany in a Hiking and Trail riding map (german). The tags required for rendering are:

Tag Description

type=route

route=foot or
route=hiking (used more often) or

name=*

Meaningful route name suitable for identifying this route.

symbol=* Verbal description of the route marker symbols.
osmc:symbol=* Coded description of the route marker symbols.


route network Description
foot iwn International walking network: long distance paths used for walking routes that cross several countries, for example the Camino de Santiago
foot nwn National walking network: long distance paths used for walking routes that cross countries
foot rwn Regional walking network: used for walking routes that cross regions

In Belgium and the Netherlands this is used for the walking node networks

foot lwn Local walking network: used for small local walking routes. Could be touristic loops or routes crossing a city

Some examples:

  • Please add here...

Inline Skating routes

Inline Skating routes have mainly been mapped in Swtzerland EN:Switzerland/InlineNetwork with route relations, Lonvias Skating map will render such routes. In general it is probably a good idea to add the tags: "type => route" and "route => inline_skates". The following tags are used in rendering:

Key Value Comment
network international / national / regional / local Specify the network as a international route, national route, a regional route, or a local route
ref a reference (optional) 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 proposed (optional) Routes are sometimes not official routes pending some negotiation or development -- the map renders these routes dotted.

More material on tagging inline skates relevant information: Inline Skating page (currently only available in German

Some examples in use:

Detours

route network Description
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.

Core values

Key Value Element Comment Rendering Photo
route bicycle relation Cycle routes or bicycles route are named, numbered or otherwise signed. May go along roads, trails or dedicated cycle paths
route bus relation The route a public bus service takes. See Buses.
route canoe relation Signed route for canoeing through a waterway.
route detour relation Route for fixed detour routes. Examples are Bedarfsumleitung in Germany and uitwijkroute in the Netherlands
route ferry way relation 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 foot relation Walking Route - is used for routes which are walkable without any limitations regarding fitness, equipment or weather conditions.
route hiking relation Hiking explains how to tag hiking routes.
route horse relation Riding routes
route inline_skates relation Inline has more information on the subject.
route light_rail relation Route of a light rail line.
route mtb relation Mountain biking explains how to tag mtb routes.
route piste way relation Route of a piste (e.g., snowshoe or XC-Ski trails) in a winter sport area.
route railway relation A sequence of railway ways, often named (e.g., Channel Tunnel). See Railways.
route road relation Can be used to map various road routes/long roads.
route running relation For running (jogging) routes.
route ski relation For ski tracks (e.g., XC-Ski Trails User:Langläufer/Loipemap).
route subway relation Route of a metro service
route train relation Train services (e.g., London-Paris Eurostar) See Railways.
route tracks relation Railroad track as rail infrastructure.
route tram relation See Trams for more information on tagging tram services.
route trolleybus relation The route of a trolleybus service.
route User defined relation All commonly used values according to Taginfo.

This table is a wiki template with a default description in English. Editable here.

List of route types in use

This is a table with possible route tags being used right now:

route Description
bicycle
bus bus routes over ways
canal inland waterway routes for motorboat, barges ... members are way waterway=river or waterway=canal
detour a named, permanent detour
ferry ferry routes over water
fitness_trail for fitness trail with extra exercise stations
foot
hiking
horse
inline_skates
mtb mountainbike routes
pilgrimage The pilgrimage routes are tagged as hiking or bicycle route, with pilgrimage=yes and religion=*.
See for example Camino de Santiago and EV3. See also Category:Pilgrimage.
piste Proposed for the routes of pistes (e.g. snowshoe or XC-Ski trails) in winter sport areas.
power where power lines use the same towers (the same way)
railway
road long roads with a common name or ref. e.g. a european motorway made up of many segments of national motorways
running Used for marked running routes usually between 2-20km used for exercise
ski For ski tracks (e.g XC-Ski Trails User:Langläufer/Loipemap)
snowmobile For snowmobile routes. Either between two destinations or collection of routes operated by someone
taxi See also: route=share_taxi
tram A tram service. See trams.
trolleybus See bus
cycling Used for cycling events (like stages of the Tour de France). For (recreational) cyclenetwork use bicycle
please add here

Step by step guide

How to create a new route (it is slightly different if you want to add ways to an existing route).

Potlatch

  1. Ensure all ways which the route runs along exist and are appropriately tagged (e.g., highway=footway)
  2. Select the first way and click on the second symbol on the right side, which looks like two chain segments.
  3. Select a relation from the drop-down, if there's an appropriate existing one in this area. If the existing relation to choose is far away, use the search function. Otherwise, select Create a new relation and click Add.
    1. Add a type tag with the value route.
    2. Add additional tags as needed. (Use the + button)
    3. Click OK.
  4. The relation is 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.
  5. Repeat steps 2-4, selecting the appropriate relation (the one just created) in step 3.

JOSM

  1. Ensure all ways which the route runs along exist and are appropriately tagged (e.g., highway=footway)
  2. Make sure the relation pane (Alt+R) is open
  3. Select New in the relation pane to create a new relation
  4. Fill in the appropriate tags in the dialog that pops up, at least type=route and preferrably name as well with a name for the route
  5. Click OK
  6. Now select some or all of the ways you'd like to add to the relation using the normal select (S) tool, then click Edit in the relation pane with your relation highlighted. The relation editing dialog will pop up
  7. Click Add selection in the relation dialog to add the selected ways to the relation.

Mapping practice

Multiple routes share the same path

Especially with bicycle routes it can happen very often that multiple routes run along the same ways for a far distance. There exist so many different bicycle route networks that are operated by different institutes that it is not unusual that some of these networks overlap. The EuroVelo routes for example use the already-existing infrastructure in many countries. There are two practices at the moment how to process 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 different 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, as you have to add the ways to all relations.
  • People might not see that the path is also used by other routes and might forget to apply their changes to all relations. Thus the data may get 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.
  • Relations might become very big, which makes it hard to work with them (analyzers need more time to process them, drawing them into the map will take a lot of JavaScript CPU time).
  • 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 part, we don’t create two ways for them 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 anyway. 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 has already been mapped). (Note: OSM Route Manager supports sub-relations)
  • 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 just 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 sub-relations 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 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're never quite sure whether you see all 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 only need to know 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), as with a super-relation his part of the route gets automatically added 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 might also be important of how many different way objects a segment consists 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 to decide which tagging method to use is to find out if the routes only use the same ways by coincidence. Thus, if in the case that one route is changed, the other route will likely still be using the old way, using part-relations would not be appropriate.

Size

Common practice is not to create route relations with more then 250-300 members. If you need to create bigger relations - which could easily happen - 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 work on it at the same time.
  • Save ressources on the side of the servers.

There is also a list of Monster_Relations.

Notes

Helping Tools