All Projects → traines-source → time-space-train-planner

traines-source / time-space-train-planner

Licence: GPL-3.0 license
An SVG-based tool to visualize public transport journeys retrieved from a HAFAS system

Programming Languages

go
31211 projects - #10 most used programming language
javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to time-space-train-planner

raptor
Implementation of the Route Based Public Transit Algorithm (Raptor)
Stars: ✭ 64 (+128.57%)
Mutual labels:  journey-planner, public-transport
tripkit
Swift library for querying data from public transport providers.
Stars: ✭ 50 (+78.57%)
Mutual labels:  public-transport
ideas
How to make public transport more comfortable, more accessible, more transparent?
Stars: ✭ 35 (+25%)
Mutual labels:  public-transport
linked-connections-server
Express based server that exposes Linked Connections.
Stars: ✭ 12 (-57.14%)
Mutual labels:  public-transport
oebb
Austrian Federal Railways (ÖBB) API client.
Stars: ✭ 40 (+42.86%)
Mutual labels:  public-transport
gtfstools
General Transit Feed Specification (GTFS) Editing and Analysing Tools
Stars: ✭ 31 (+10.71%)
Mutual labels:  public-transport
otp-tutorial
Introductory tutorial (approx. 3 hours) covering the setup and querying of an OpenTripPlanner instance
Stars: ✭ 85 (+203.57%)
Mutual labels:  public-transport
korail
Client for the South Korean korail railway API.
Stars: ✭ 47 (+67.86%)
Mutual labels:  public-transport
db-prices
Find journey prices using the DB Sparpreise API.
Stars: ✭ 82 (+192.86%)
Mutual labels:  public-transport
interrail
Find european train stations and routes. Client for the European Interrail / EuRail API.
Stars: ✭ 24 (-14.29%)
Mutual labels:  public-transport
realtime-transport-dashboards
Serverless APIs for AWS to build and display public transports real time data (Serverless application example)
Stars: ✭ 23 (-17.86%)
Mutual labels:  public-transport
transport-apis
machine-readable list of transport API endpoints
Stars: ✭ 32 (+14.29%)
Mutual labels:  public-transport
sdk
🔧 TypeScript SDK for Entur APIs
Stars: ✭ 36 (+28.57%)
Mutual labels:  public-transport
MMM-PublicTransportBerlin
MagicMirror module to display public transport in Berlin and Brandenburg with BVG Hafas data.
Stars: ✭ 37 (+32.14%)
Mutual labels:  public-transport
matsim-sbb-extensions
matsim swiss rail
Stars: ✭ 23 (-17.86%)
Mutual labels:  public-transport
dm tomatrixled
Display (real-time) public transport departures using Raspberry Pi and LED matrices
Stars: ✭ 17 (-39.29%)
Mutual labels:  public-transport
3D-Public-Transport-Simulator
The 3D Public Transport Simulator is a Unity-based simulation, which uses OpenStreetMap data in order to support the simulation of worldwide locations. The development was part of a Bachelor thesis.
Stars: ✭ 87 (+210.71%)
Mutual labels:  public-transport
kiel-live
This app allows you to view live updates of bus arrivals.
Stars: ✭ 20 (-28.57%)
Mutual labels:  public-transport
fastgtfs
A pure Rust library that provides GTFS parsing, navigation, time table creation, and real-time network simulation.
Stars: ✭ 21 (-25%)
Mutual labels:  public-transport
european-transport-operators
NOT UP-TO-DATE ANYMORE, UNMAINTAINED. CHECK european-transport-feeds INSTEAD. List of european long-distance transport operators, available API endpoints, GTFS feeds and client modules.
Stars: ✭ 47 (+67.86%)
Mutual labels:  public-transport

Time-Space Train Planner

An SVG-based tool to visualize public transport journeys retrieved from a HAFAS system, in order to see all possible connections and possibly find faster connections. See it in action in this video: https://youtu.be/rD5iATcC9Mo

Example Diagram

Often, the HAFAS routing system will not show the fastest routes, because it deems the transfer times too short or because there are just too many possibilities. This tool will display all direct connections between a given set of stations and will help you find the fastest connection and any backup connections that might be good to know about. You can click on individual connections to show the shortest route to the destination from that connection (with a minimum transfer time of zero minutes).

TSTP is currently in an early alpha stage. I.e. it is unstable, does very little error handling and is not very user-friendly yet.

Running TSTP

The server-side part is written in Go, there is also a small client-side JavaScript part. You will have to run your own server to use this software.

TSTP relies on an adapted HAFAS API provided by hafas-client, more specifically, db-rest. You need to run your own instance of this API adapter separately from TSTP, or use a publicly available one (e.g. https://v5.db.transport.rest/).

In addition, you should run an aggressive HTTP cache in between TSTP and this API, because TSTP itself is stateless and will repeatedly issue identical requests for the same resources while gathering data. In deployments/nginx-cache.conf, you find an example of how to configure Nginx as an HTTP cache. Please note that this configuration will cache for a very long time. You will not be able to get updated live information for a particular request. If you use the provided docker-compose.yaml as is, an Nginx reverse proxy using this configuration will be started alongside TSTP.

The steps to run TSTP itself are:

  1. Copy deployments/conf.example.env to deployments/conf.env and fill in the hostname of your cached API (API_CACHE_HOST) and, if your setup is not exactly mirroring db-rest, the path prefix (HAFAS_API_CACHE_PREFIX). If you run the cached API on another host, you probably want to adjust the API_CACHE_SCHEME to https. The DB Open API and thus the respective environment variables are currently not used anymore.
  2. Copy res/conf.example.js to res/conf.js and fill in the complete URL to the /stations endpoint of your cached API. Obviously, since this will be used by the browser for autocompletion, this URL needs to be accessible from the outside (i.e. no Docker hostname).
  3. Start TSTP using the docker-compose.yaml. If you use the configuration as is, you should access TSTP via the reverse proxy, i.e. via the host-mapped port 8080. Or, if you have installed all Go dependencies, start TSTP without Docker using start.sh, in which case TSTP itself will be available under port 3000.
  4. Access TSTP at your selected port under /tstp in your browser.
  5. If something goes wrong, consider looking into TSTP's stdout logs.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].