Skip to content
This repository has been archived by the owner on Mar 21, 2023. It is now read-only.

A project to visualise confidence in NaPTAN open data for national public transport.


Notifications You must be signed in to change notification settings


Repository files navigation

Bus Stop Checker

A project to visualise confidence in NaPTAN open data for national public transport.

This repository contains the project that processes OpenStreetMap + NaPTAN data, it does not contain an API or UI.

This is roughly how the tool works:

  1. Find nearest OpenStreetMap (OSM) road using OSRM.
  2. Calculate road bearing.
  3. Find position of the stop with respect to the road.
  4. Check if stop bearing is similar to road bearing.


There is an in-progress re-write of this project, see branch feature/v2

V2 contains many bugfixes and improvements, and a general refactor, we'd recommend using feature/v2 where possible

Master branch is currently used for generating the production data for



The full pipeline can take an hour to process, this is heavily dependant on the hardware used - the amount of processing threads and memory available, the size of the geographical area/NaPTAN dataset processed, as well as your internet connection.

This project has only been tested on Linux (Fedora/Ubuntu). Windows and MacOS have not been tested.

This project is designed to run within Docker containers, as it requires a specific configuration/set of installed packages to function.


  1. Run make build to build the containers
  2. Run make build-graph to download the latest OSM data for Great Britain and build an OSRM graph.
  3. Run make download-naptan to download NaPTAN.
  4. Run make extract to extract OSM nodes into a LevelDB database.
  5. Run make import to process and import stops into postgres.

Accessing Results

All results are stored in PostgreSQL, you can see the default credentials in the Makefile.

By default, PostgreSQL is started on

A Protocol Buffers file is also created (verifications.pbf), which can be read using verifications.proto.


This project is written in Javascript runnable by Node v10, we recommend using the docker containers otherwise you'll have to compile OSRM bindings on your host.


This project is open sourced for informational purposes only, and is not currently under active development.

No support will be provided in the usage or modification of this project.

Pulls requests and issues are welcome (for feature/v2), but will be addressed sporadically.

Known issues

Possible mismatch of selected OSM nodes because of Project-OSRM/osrm-backend#5415, could work around this with the PostgreSQL database, or entirely replace OSRM with PostgreSQL for snapping to the road network.


Copyright 2020 Passenger Technology Group Ltd

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


A project to visualise confidence in NaPTAN open data for national public transport.







No releases published


No packages published