This is an in-development project that processes Network Rail's Open Rail Data feeds - absorbing all sorts of information about train schedules, and keeping a record of current and historic live train data. The eventual end goal of the project is to link this information into OpenStreetMap geodata, in order to provide cool things like a live map of train locations (approximately, that is), predictions on level crossing opening & closing times, and the ability to find out which trains are going to pass any location on the railway at any given time. It's all written in Rust as well, because Rust is cool.
However, it's very much not done yet! Watch this space for further stuff! Also, feel free to join the chatroom (#trainsplorer on chat.freenode.net), if you'd like to discuss the project (or anything about trains in general, really). (We also keep logs for that chatroom, in case you're interested in seeing what we've been up to.)
This repository contains many individual Rust crates. Here's a short overview of what they do:
atoc-msn
: parses the Master Station Names (MSN) file from the Rail Delivery Group's Industry Data datasetntrod-types
: parses data from the Network Rail open data feeds, specifically the SCHEDULE, Train Movements, reference data, and VSTP feedsosms-db
: the main database library for the project; handles storing data into and retrieving data from a PostgreSQL database, as well as performing some other handy utility functions, such as navigating between two points on the railwayosms-db-setup
: builds onosms-db
, and contains a utility for loading data into the database in the first placeosms-nrod
: connects to the Network Rail STOMP messaging service and the National Rail Enquiries Darwin feed, and processes real-time train data, storing it in the database usingosms-db
osms-darwin
: used for testing the Darwin feedosms-web
: a fancy webserver with lots of buttons to press that enables people to admire the wonderful collections of data in the databasedoc
: that's not a crate, that's a directory containing mostly incoherent design notes and the like
Yes! That's what osms-web
is for, after all. Here you go:
All crates in this repository are free software: you can redistribute them and/or modify them under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
The atoc-msn
, national-rail-departures
, and ntrod-types
crates are also
licensed under Apache 2.0 and MIT terms. This means that you can
use these crates (but only these crates) under AGPLv3, MIT, or Apache 2.0
at your option.