Import/Catalogue/Bus stop import Norway
- 1 Introduction
- 2 Goals
- 3 Schedule
- 4 Import data
- 5 Data preparation
- 6 Data merge workflow
- 7 Updates
- 8 See also
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)
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
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
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.
The initial import and conflation is a one time import.
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 do 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.
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.
|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|
|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.
The changesets will be uploaded using the account nsr2osm and will be tagged with:
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
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.
- 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.
- 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 Vestfoldin the wizard. Make sure that any parent relations and ways are also downloaded.
- 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.
- 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
- Conflate all bus stops (click the Conflate button). Remove old ref and source attributes.
- 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
- 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. The update file needed is generated by the program but the actual upload to OSM is manual from JOSM.
The update file may also be used by Entur to discover for example improvements made in OSM to the bus stop locations/coordinates.