The British railway timetable works on TIPLOCs but where many of these are isn't always clear. Of about 6,568 TIPLOCs in a working timetable this collact a location-report.tsv
file containing longitude and latitude for about 6,437 (131 missing locations) corresponding to about 0.022% of allocated TIPLOC-paths.
This is a set of scripts that uses Open Data sources to guess the locations of most of the TIPLOCs (TIming Point LOCations) used in the railway timetable in Britain. This data consists of:
This uses these OpenData feeds:
- Network Rail BPLAN
- Network Rail CIF timetable data
- National Public Transport Access Node (NaPTAN)
- Network Freedom of Information request
- OpenStreetMap rail data
Maps between these dataset is then in the data
directory in TSV
Once the dependencies to create the locations-report.tsv
and missing-report.tsv
files run the script:
$ ./run.sh
These are environment and project dependencies.
These scripts were built and run on a Debian type Linux system (Debian/Ubuntu/Mint) and python3.
To manage the python dependencies this uses miniconda3 installed in the userhome directory. Create a virtual environment called venv
in the project directory:
$ ~/miniconda3/bin/virtualenv venv
Then activate the python virtual environment venv
:
$ source venv/bin/activate
Then install the required GDAL dependencies and python3 packages:
$ sudo apt install libgdal-dev ogr libspatialindex-dev
$ sudo apt install jq curl osmium-tool osmctools
$ pip install pygdal=="`gdal-config --version`.*"
$ pip install geopandas requests geojson xmltodict lxml rtree
This also requires a working Apache Solr docker installation loaded with NaPTAN and a copy of the working timetable. Details about are in the wagtail github repository.
If hostname of a remote Apache Solr server is solrsvr
set this using the SOLRHOST
environment variable:
$ export SOLRHOST=solrsvr