Metro Mapping

From OpenStreetMap Wiki
Jump to navigation Jump to search

This document aims to clarify tagging of metro stations and lines, in the light of the modern Public Transport schema, and to make the data usable to data consumers. Having all metro systems tagged in a uniform and complete way would allow for making metro schemes and for proper routing.

More than two hundred metro networks all over the world have been already mapped as this document proposes. Refer to the metro validator for the list and for unresolved issues in other networks. MAPS.ME and Organic Maps applications use subways from OpenStreetMap mapped to this schema, and since the code is open source, other apps may follow.

Some parts of this schema, namely changes to route, stop_area and stop_area_group relations, are discussed in the PTv2 Improvements proposal. Which means, they are not included in the "official" wiki pages for these relations. This should not put you off since wiki does not always reflect the real mapping.

Overview

Metro-stop area group.svg

Tagging Stations

Of these objects, only the station node is mandatory for each station. Also, if possible, mark the subway entrance points, so routers won't bring people to an overground location of an underground station.

Station Node

Use only a single node node for marking a subway station. No ways, no multipolygons. Three mandatory tags on it are:

You are welcome to add more useful tags, like:

The location of the node is irrelevant. Most often it is placed in the middle of a platform, be it underground or not. This sometimes causes controversies, since the station node is displayed very prominently on most maps, and people mistake it for the overground entrance. There is nothing wrong with putting the node near its entrance: it does not affect routing or anything else.

Overground light rail and train stations can be mapped with polygons. You may also use the public_transport=station tag along with subway=yes or light_rail=yes.

Entrance

Please map station entrances and exits as nodes: it helps with the pedestrian routing. There is a single mandatory tag for subway entrances and exits:

But a lot of optional and highly recommended tags:

  • ref=* if subway entrances are numbered and you know the number for this one.
  • highway=elevator if the entrance is an elevator.
  • wheelchair=*
  • entrance=entrance if you cannot exit the station here, and entrance=exit if you cannot enter here. See also roles in stop_area relations. Oneway footways cannot be processed by all software, so please add this tag where known.

Platform

If you know the location and length of a platform for a subway station, map it as a way way. If you know the dimensions, you can draw an area or a multipolygon. You can see an example of such thoroughly drawn platforms here.

Use these mandatory tags on a platform:

Also recommended:

  • level=-M for when the exact level of the platform is known.
  • ref=* when a platform is numbered.
  • name=* with a name of a platform or a station, for easier route editing.

Footways

If you want to map underground passages connecting entrances to platforms and platforms to other platforms, knock yourself out. Do not forget to use layer=-N and tunnel=yes.

For more complex underground mapping, please consider using level=-N and Simple Indoor Tagging schema.

Stop Position

The modern public transport tagging schema introduces stop positions: points on rails where trains actually stop. These nodes should be placed on railway=subway/light_rail either in the front or in the middle of a hypothetical train (there is no consensus on that, do as you like). Sometimes you might need different stopping points for different route variants. The point should have at least these three tags:

Please refrain from using the same node for both a stop_position and a station. That would prevent a possible interchange from being mapped correctly.

Stop Area

To link a subway station, a platform, stop positions and entrances, put these into a public_transport=stop_area relation. For a subway station, a stop area relation should have only objects that are directly related to the station. No taxi stops, no other stations. Only objects with these tags:

You can add other POIs for the station infrastructure, like barrier=turnstile and shop=ticket. You should not add any tracks, footways, or bus stops. Use a station name for the stop_area relation name, on interchanges adding a line ref.

Interchange

Interchange types.jpg

An interchange is a station or a group of stations where you can change lines or direction of travel. Technically by this description, most metro stations are interchanges. There are three types of interchanges, pictured above (A and B are lines, not stations):

  1. First is when to change a line, you have to wait for the next train on the same platform, or walk a few meters to another nearby platform. You usually can see all tracks and platforms in this interchange from any platform. An island platform between opposite directions of a route is a simple example of such interchange.
    You map such interchanges with a single stop_area relation.
  2. Second type is when you have to walk a reasonable time to get to another platform or a set of platforms. Sometimes even to switch directions for a single route you have to go down via an underpass. A rule of thumb is that when you need more than a minute to get from one platform to another, this is most likely a type 2 interchange.
    You map such interchanges with several stop_area relations. After that, create a public_transport=stop_area_group relation and add these stop_area relations (not station nodes!) in it.
  3. Third type requires you to leave a metro station to enter another one. It can take five minutes or more to switch lines, and you would need to use on-the-ground pedestrian routing to find another entrance. This is not unlike moving between stations of the same line by leaving at one and entering at another. The line between type 2 and type 3 is blurred: please use your judgment and official maps.
    You still create stop_area relations for these stations or platforms, but do not group these in a stop_area_group relation.

It does not matter whether an interchange is between differently-named stations or within a single big station. When a group of stations is formally a single station on all of the maps, it is okay to use a single station node, including it into all relevant stop_area relations.

If a station is mapped only with a station node, to create a stop area group, you would still need to create stop_area relations, even if just for a single node. Stop_area_groups collect only stop_area relations, stop_areas collect everything station-related.

Multimodal Interchange

When stations for buses, trains, trams or other modes of transportation are located near a metro station, especially when they are named similarly, do create stop_area relations for these stations (one for each mode) and add these along with the stop_area for a metro station in a public_transport=stop_area_group relation.

Do not add e.g. bus stations into a subway station's stop_area. Make two stop_areas and group these instead.

Tagging Lines

Tracks

If you don't know how the underground tracks go, that is okay: just skip this. Tracks are optional.

To make the map a bit more complete, try connecting the stations and doing smooth turns. See railway=subway for a list of tags that go on the tracks. For a light rail tracks, switch subway for light_rail. The railway=light_rail page is not as descriptive but provides some hints for the distinction of a subway, light rail, and regular tracks.

To simplify future mapping, it is best to draw a pair of parallel tracks. Do not use oneway=yes on these, even if you know in which directions trains usually go. Instead, look at railway:preferred_direction or designated_direction=* keys. Put track numbers in railway:track_ref=* tags if you know these.

Route Relations

For each of the subway and light rail lines, there should be at least one route=subway or route=light_rail relation. Usually there are two, one in each direction. Sometimes more, when certain trips end earlier to be redirected to depots. When there are many route relations for a subway line, there should be at least one that contains all the stations in the line.

These tags are mandatory for a route relation:

  • type=route obviously
  • route=subway (or light_rail)
  • ref=* with a line number or short reference.
  • colour=* with an official line colour, either a hexadecimal value (#ffeedd) or a CSS3 colour name (red). Get it from an official metro map. If there isn't one, skip this tag.
  • network=* is mandatory when there is more than one network in the city (e.g. New York has three).

Also recommended:

  • operator=*, which should be the same for all lines of that operator.
  • name=* with a full name of the line.
  • interval=* with a service interval in minutes.

When a line has an evident casing on the official map, especially when the line colour is white, put the main colour (of the casing) in colour=*, and the inner colour — in colour:infill=*. This way you won't have a dozen white lines in software that doesn't support infill. For example, colour=cyan + colour:infill=white for London DLR routes.

Relation Members

A route should have all its stops included and ordered from the first to the last. The recommended way is adding stop positions with "stop" roles. Adding platforms for each station is recommended. In that case, platform objects (with "platform" roles) should follow stop objects. There should be only one stop object and at most two platform objects for each station. For circular routes, the first station should equal the last (as with closed ways and their nodes).

If tracks are included, they should be sorted from the first to the last stop and should form a single line without gaps. When a line branches, you should create a separate route relation for the alternative route.

If a relation contains stop positions or platforms, these should belong to stop_area relations, so an algorithm could match these to station objects. Also, each stop and platform should belong to a single stop_area relation, otherwise it would look like a train stops at two stations simultaneously. That means, on type 2 transfer stations that are denoted by a single station node, you would need to make stop positions or platforms for each metro line, and include these into routes instead of the station node.

Route interchange.jpg

On type 2 interchanges, adding a station node to routes will not do. Add stop_positions to lines, use them in route relations instead of the station, group each of stop_positions with the station using a stop_area relation, and group these stop_areas in a stop_area_group relation.

Grouping Routes

All ref=* values for variants of a single route should be equal. That is enough to group these relations. But you can create a grouping type=route_master relation, as per the public transport schema. In that case, you can put ref, colour and network tags on it instead.

See Also