Adding bus stops to OSM

by multimob — written on 2022-01-25


Stops are the main component of a public transport system. Getting stops on the map is an essential task for mappers.

Who came first, the egg or the chicken? The bus route or the bus stop?

For OSM, it looks like starting with the stops is a better option.

Definining what a bus stop is

First clarification required here: on a typical road, buses will travel in both directions, with one stop post on each side of the road.

Even though the name is the same in both directions, for OSM we must consider them to be two different stops. PT operators will typically assign them a name but assign them a unique identifier. In the most common situation, there will be one node on each side of the road. You can locate it on the stop post itself. If you cannot locate it exactly, make sure you get the closest possible location, as long at is is clear.

Required tags are highway=bus_stop + public_transport=platform + bus=yes. And of course name to put its name. When you are done, the map will look like this.

Map detail of a road with one bus stop on each side of the road

Additional tags

There are many more tags, they will be covered in other articles.

Here are the more important ones:

A bus stop is a place where passengers can board or alight from a bus. The most typical situation has one stop on each side of the road, i.e. one per direction. In most cases, they will have the same name but they are considered as two bus stops for OSM.

Where to put it

The simplest case is as such: create a node, locate it exactly where you see the stop pole along the sidewalk.

Tags

Mandatory tags

Required tags are highway=bus_stop + public_transport=platform + bus=yes.

What’s in a name

In most countries, bus stops will have a name. The name is the public name given by the operator. Make sure to spell it correctly.

This will be discussed in a future post.

Operator and network

operator and network are standard text strings. Some care must be applied here: people will always query the OSM database and you can group all the stops belonging to the same network. This is why those must always be written in the same manner. There are conventions, e.g. the national railway company is known as NMBS in Flanders and SNCB in Wallonia but it is the same company, therefore we will write operator=NMBS/SNCB on all railway stations in Belgium, and the same text string will be used across the country. This is how we make sure we can easily query all of them at once.

March 2023 update: There is no article so far explaining how TEC subnet work but this article about the network tag can be useful.

Reference code

Each stop has a unique identifier. This identifier is provided by the operator, it can never be guessed.

That stop id can be found on government portals or various open data feed (such as GTFS); alternatively they might be guessed by scraping the website: find the URL giving (real-time) information about a stop, some part of the URL might be that code. Finally, the stop code could be obtained by looking at printed timetables or on stop signs themselves, as it will be usually printed in small characters somewhere.

This id is stored as ref in OSM. Some networks use a more sophisticated approach. In Belgium, we use ref:De_Lijn for De Lijn stops, ref:STIB_MIVB for STIB/MIVB and ref:TEC? for TEC (where ? is one out of 6 possible choices, as there are 6 sub-networks); this is to avoid ambiguity for stops that are operated by several companies.

De Lijn uses a 5-digit number, the first digit gives the province.

STIB/MIVB uses a 4-digit number and sometimes an additional letter. When a stop is renamed or moved, the number will change, though it looks like in recent times only the additional letter is incremented (1418A becomes 1418B).

TEC uses a really convoluted system: in many provinces the character string is made of 3 parts: B stands for Brabant wallon province, "bou" will mean that the stop is in Bousval, "rel" will be a short name for "Au Relais", and stops with the same name will be numbered starting with 1, therefore the stop code will be Bbourel1. TECB, TECC and TECL use this system. TECH uses a more complicated system: the province is split into sectors, stop codes start with H1, H2 or more, then letters for the town name, numbers for the stop name, and stops with the same name will be numbered starting with a, therefore the stop code will be H1bx105a for Baisieux Cimetière (H for Hainaut province, zone 1, bx for Baisieux, 105 is the stop number and "a" is the platform). TECN and TECX use an even more complicated system where town names are written as numbers and stop names as 2-digit letters: X753abb for Dochamps Carrefour (X for Luxembourg province, zone 7, 53 for Dochamps, ab is the stop number and "a" is the platform).


Permalink: https://blog.multimob.be/zzneez5dua.htm

Back to the index

Screenshots with maps are © OpenStreetMap contributors