Note that this documents the tags supported by the public transport renderer here and not necessarily the cleanest way to map. Most meaningful is an ordered relation per direction of travel with the positions of the platforms or stopping places put on. There is a complete proposal to record public transport routes at User:Oxomoa/Public transport schema.

Stations

Stops without joining relation are automatically combined into stations. If you are not happy with the result create a relation.

Lines

Principal line information is derived from relations. Whether each direction of travel has its own relation is put on is relatively insignificant for the map display; a separate set is however essential for applications that need the exact process of a trip.

Roles of the members

The evaluated roles of the members are identical, all the same whether a relation per direction or per line is put on. The forward/backward roles are always needed for that to represent the small directional markers, even if the information could be derived during separate collection of the direction of travel theoretically also from the individual sorted routes of the line by alignment. To reporta line by clicking on a stop the platforms must be contained in the relations. To report the routing they must also be in order.

Role

Type

Description

empty (alternatively also route)

Way that that is part of the line in both directions.

forward

Way that is part of the route in the direction of the way.

backward

Way that is part of the route against the direction of the way.

alternate

Way that is only occasionally used by the line. (not yet implemented)

stop/platform

Stop/platform where the line stops in both directions. On nodes the role can be left out, but it is better used. The role can also be “stop_X” or “platform_X” because only the beginning of the role is checked.

forward_stop/forward_platform

Stop/platform where the line stops in the direction from from=* towards to=*. On nodes the role can just be “forward”. The role can also be “forward_stop_X” or “forward_platform_X” because only the beginning of the role is checked.

backward_stop/backward_platform

Stop/platform where the line stops in the direction from to=* towards from=*. On nodes the role can just be “backward”. The role can also be “backward_X” or “backward_platform_X” because only the beginning of the role is checked.

alternate_stop/alternate_platform

Stop or platform where the line only stops occasionally. On nodes the role can just be “alternate”. The role can also be “alternate_stop_X” or “alternate_platform_X” because only the beginning of the role is checked.

The ordering of the relation only plays a role with the stops at the moment, it is however better for the entire relation to be ordered. It is however only relevant that the ordering of the ways, the forward stops and the backward stops among themselves means that the stops do not have to lie between the correct ways.

Practical notes

It is to be noted that “forward” and “backward”, as described above, have nothing to do with the outwards and the return directions. It is therefore possible for ways in the direction “from→to” to be both “forward” and “backward”. They relate to roads whose OSM directions the route follows or goes against. For example a route against the direction of traffic along a one-way street is tagged “backward” (if it does not have oneway=-1), whether the bus is on the outwards or return trip.

If a relation is not put on for each direction of travel most stations must be registered with two stops: Once with “forward_stop” and once with “backward_stop”, in order for the representation of the line to be indicated correctly (example: http://www.öpnvkarte.de/route.php?name=37&id=225469 or http://www.öpnvkarte.de/?lat=50.07109&lon=8.23781&zoom=16&layers=BT). That naturally has a real advantage only if the bus stops in both directions of travel are mapped as separate nodes and are assigned correctly in each case, so that finally each node is only in the relation once. It is considered that the sequence is “as you would sit and would write in the bus”, the first “forward_stop” is thus also the departure place indicated as “from”. In addition, it is the last “backward_stop” of all. The destination stop indicated as “to” appears exactly in the middle of the stop list twice directly one behind the other, once as the last “forward_stop” and then as the first “backward_stop”. The trip route and the stop list can thus be separated appropriately, for example recording only the entire journey from the “from” point to the “to” point (with all ways only travelled on in one direction if necessary) into the relation. Subsequently you can insert only all “forward_stop”s and afterwards all of the “backward_stop”s. This has the advantage that if necessary you can compare an existing stop list directly with the stops existing in the OSM relation.