Skip to content

'rl_UK' is a command-line tool in Python for calculating the full BUS routes using shortest path calculation between BUS stop sequences in the UK and joining it with metadata related to a BUS route (schedules, etc.). As input files, it uses an ATCO-CIF file and 'OS Open Roads' dataset from Ordnance Survey Data Hub.

NMItools/rl_UK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

'rl_UK' is a command-line tool in Python for calculating the full BUS routes using shortest path calculation between BUS stop sequences in the UK and joining it with matadata related to a BUS route (schedules, etc.). As input files, it uses an ATCO-CIF file and 'OS Open Roads' dataset from Ordnance Survey Data Hub which is imported into PostgreSQL database. The tool is using PostGIS/pgRouting extensions for PostgreSQL.

ATCO-CIF

ATCO (Association of Transport Coordinating Officers) CIF (Common Interface File) was the United Kingdom standard for bus timetable data transfer for the first decade of the 2000s, but has since been largely replaced by TransXchange. CIF file contains UK timetabled public transport data and holds information from the Traveline National Dataset (TNDS) and Associate of Train Operating Companies (ATOC) as well as NAPTAN stop references.

Since it is a somewhat unfriendly and difficult to use format, this CLI tool reads .cif files and transform particular parts of data into SQLite/PostgreSQL table. You can read here short description of codes

Screenshot 2021-11-24 13 54 26

OS Open Roads dataset

OS Data Hub is the British Ordnance Survey platform for accessing UK geospatial data. The first release of the OS Data Hub was launched in July 2020 and replaces the OS OpenData Portal and the API shop for all users.

OS Open Roads dataset is a high-level view of the road network, from motorways to country lane. Its available in ESRI® Shapefile, GML, GeoPackage, and Vector Tiles. This CLI tools imports ESRI® Shapefile into a PostgreSQL database and use PostGIS/pgRouting extensions for a shortest path calculations.

Screenshot 2021-07-29 22 07 36_OS_data

Screenshots

Loading SHP into a PostgreSQL:

Screenshot 2021-07-23 10 30 58

Calculating routes:

Screenshot 2021-08-03 11 59 12

A final calculated BUS route displayed over Google Maps:

Screenshot 2021-05-10 14 45 48

About

'rl_UK' is a command-line tool in Python for calculating the full BUS routes using shortest path calculation between BUS stop sequences in the UK and joining it with metadata related to a BUS route (schedules, etc.). As input files, it uses an ATCO-CIF file and 'OS Open Roads' dataset from Ordnance Survey Data Hub.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published