Import/Catalogue/Bus stop import Norway

From OpenStreetMap Wiki
Jump to navigation Jump to search


This project will import all bus stops and bus stations in Norway. All bus operators are required by law to report their routes/time tables including stop places to a government entity called Entur for the purposes of making journey planning and ticketing possible across different regions and transport modes. A national master database for all public transport stops in Norway has been established to ensure correct and uniform referencing in time table data. Entur makes all stop place data available as open data from the National Stop Register (NSR) database. An explicit permission to use the dataset has been granted to OSM.

Entur, by the way, also uses OSM for pedestrian routing in relation to journey planning, as well as its background map in web services and apps. They frequently contribute to OSM regarding public transportation features, footways and highways which are useful for routing.


The goal of this project is to:

  • Import all 97,993 bus stops and 130 bus stations and conflate them with the existing 28,387 bus stops and 187 bus stations in Norway
  • Update all stops and stations on a regular basis in the future


  • 17 February 2019 - Explicit permission obtained from Entur - link
  • 3 March 2019 - Import plan submitted for discussion on the Norwegian forum - link
  • 16 March 2019 - Import plan submitted for review on the Import list - link
  • 30-31 March 2019 - Bus stops and stations imported, except Troms and Trøndelag counties (waiting for data quality to improve)
  • 1 January 2020 - Bus stops and stations in Troms and Trøndelag imported after quality improvements

Import data


Stop places and stations are created and maintained by the regional public transport authorities in Norway, and stored in the National Stop Register (NSR). Entur curates the content of NSR and uses it as a source for its journey planner.

  • Data source site: Current NeTEx file
  • Data license: NLOD
  • Type of license (if applicable): Governmental license
  • Link to permission (if required): Explicit permission obtained 17 February 2019 - link
  • OSM attribution (if required): Contributors#Entur
  • ODbL Compliance verified: Yes, explicit permission obtained

Data files

When extracting data, NSR should primarily be accessed through its API or the derivative Geocoder, but it may also be viewed through its web interface at using the guest account.

For bulk data from NSR, files are made available here through daily updated XML files in the NeTEx format. This format has been chosen by the European Commission as its standard format for exchanging public transport information. The python program nsr2osm_dump reads the files and produces OSM/XML files which can be opened in JOSM. The program nsr2osm is used for later updates after the initial import.

The generated OSM file nsr_current.osm is available here. Please disregard train, tram and ferry stops - only bus stops and bus stations will be imported. Attributes with keys in capital letters will not be imported. A file containing all Norwegian bus stops and stations currently in OSM is also available in the folder

Data quality

Two counties, Troms and Trøndelag (municipality codes staring with 19 and 50, respectively), are still updating and improving their data in NSR, so these two counties will be excluded from the import for the time being. Also, bus stops with submode railReplacementBus will not be included in the initial import because the coordinates in this subset do not yet have a satisfactory quality.

In general, the bus stop data provided has a high quality. The bus stops are used daily in web services and apps, and the data is being actively maintained. As expected there are exceptions - for instance one may find an offset bus stop 20 meters into a garden or on the wrong side of a street. The imperfections which have been discovered are considered acceptable (no worse than common mapping imperfections by the average user in OSM).

The dataset has been carefully compared with existing bus stops in OSM, and it is clear that NSR on average is of better quality than OSM. One reason may be that the majority of bus stops currently in OSM were imported at a time when bus stops data was not at the same level of quality as the currently available dataset. Bus stop quality in OSM has also been hampered by the available imagery for Norway which until recently had considerable offsets.

Based on these findings it is proposed to let the coordinates of NSR override the coordinates in OSM for conflation during the initial import. Subsequent edits in OSM will however not be reversed by later updates from NSR. A feedback loop will be established to report edits in OSM to Entur.

Import type

The initial import and conflation is a one time import.

Data preparation

Data reduction and simplification

The NeTEx files contains a lot more information than needed for OSM import. The nsr2osm_dump program extracts all attributes necessary for tagging. The update program nsr2osm does the same job for later updates after the initial import.

Source data structure

The data in NSR has a hierarchical structure with the Quay being the lowest level element, representing the physical position where a passenger may board/alight a vehicle. For this reason Quays are primarily centered at the transitional point between the sidewalk edge and a tactile paving. Where no tactile paving or kerb, is present, a rough estimate of the vehicle front door position for boarding is used. The primary information on a quay is a coordinate and when relevant a PublicCode, which represents the number- or letter-code for the platform, as seen on signs or maps at the stop. The quays are connected by its parent entity, the StopPlace, which carries name, and transport mode information.

Tagging plans

There will normally be two quays per bus stop (one on each side of the street). Each quay will become one highway=bus_stop and will carry the name of the StopPlace. Each StopPlace which is a bus station will become an amenity=bus_station. The 130 bus stations have a total of 802 quays which each will become a separate highway=bus_stop. Each quay/bus stop of a bus station will get its name from its PublicCode.

Tagging table
Object Tagging NeTEx attribute Comment
Bus station amenity=bus_station
name=* StopPlace/Name E.g. "Oslo bussterminal"
ref:nsrs=* StopPlace/id Unique identifier for bus stations
Quays of bus stations highway=bus_stop
ref=* StopPlace/Quay/PublicCode Number or letter displayed on the quay of the bus station, based on the PublicCode attribute, when available, e.g. "1"
unsigned_ref=* StopPlace/Quay/PrivateCode If the reference is not displayed on the quay, then unsigned_ref is used instead of ref, e.g. "A"
name=* StopPlace/Quay/PublicCode The ref above is also used as the name of the quay, e.g. "1". Note that a few quays have neither ref nor name.
official_name=* StopPlace/Name Quays of a bus station inherit the full name of the parent bus station as official_name, e.g. "Oslo bussterminal (1)"
ref:nsrq=* Quay/id Unique identifier for quays
Bus stops highway=bus_stop
ref=* StopPlace/Quay/PublicCode Number or letter displayed on the bus stop, based on the PublicCode attribute, when available, e.g. "A". Some time used when there are several bus stops in a cluster with identical names.
name=* StopPlace/Name Each quay of a bus stop will inherit the name of its parent StopPlace, e.g. "Smestad", or "Smestad (A)" if there is a PublicCode.
ref:nsrq=* Quay/id Unique identifier for quays

A few extra tags with capital letters have also been included to support the import, such as STOPTYPE, SUBMODE and MUNICIPALITY. These tags will not be imported into OSM.

Changeset Tags

The changesets will be uploaded using the account nsr2osm and will be tagged with:

description=Bus stop import
source=Entur Nasjonalt Stoppestedsregister

Data transformation

No transformation beyond the tagging described above. Coordinates for bus stops are the position where one would normally enter the front door of the bus, and it will kept that way in OSM.

Data merge workflow

Team approach

The import will be done by one person using the JOSM Conflation plugin.


The dataset itself is the official reference for bus stops. The bus stops may be manually checked using the Norwegian orthophotos available in JOSM and other editors. Please note that some bus stops may only be recognized by its signpost along the road, or in some cases have no physical equipment at all.


  1. One data file is provided for the entire country. Extract one county at a time based on the two first digits of the municipality number into JOSM. Please exclude Troms and Trøndelag county for the time being. Also exclude submode railReplacementBus.
  2. Download all bus stops and bus stations for the county from OSM using overpass in JOSM with a query such as highway=bus_stop or amenity=bus_station in Vestfold in the wizard. Make sure that any parent relations and ways are also downloaded.
  3. First select existing bus stops which also belong to a way or a relation and check them manually before conflation. Disconnect bus stops which are part of ways so that they may be moved without altering the connected ways.
  4. Configure the Conflation plugin and generate bus stop matches:
    • The existing bus stops in OSM are the Subject
    • The new bus stops to be imported are the Reference
    • The distance is set to 300 meters
  5. Conflate all bus stops (click the Conflate button). Remove old ref and source attributes.
  6. Inspect all bus stops in the Subject only column (existing bus stops without any match) and consider manual conflation or deletion based on orthophotos and other bus stops in the proximity
  7. Repeat 3-5 for bus stations, however each of the 130 bus stations and quays should be inspected manually when doing the conflation.


Described in steps 3-6 in the workflow section above.


Another python program nsr2osm facilitates updating the bus stops and bus stations in OSM based on the ref:nsrs=* and ref:nsrq=*tags. Changes to names or coordinates in NSR will be reflected in OSM unless the bus stations and bus stops in question have been edited by anybody else than the user nsr2osm in OSM, in which case they will not be altered. New bus stops and bus stations will be added and disused stops will be removed. An update file is generated by the program and may be uploaded to OSM manually from JOSM, or automatically from the program.

Please see instructions for using the program at nsr2osm and latest nsr_update.osm file here. The same folder also contains the latest dump of the NSR database in the file nsr_current.osm, including references to routes for each stop.

The update file is used by Entur to discover improvements made in OSM to the bus stop locations/coordinates, so there is a feedback loop from OSM.

See also