Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Transitor Routing App

A Java public transport routing engine that calculates optimal paths, travel times and distances using OpenStreetMap and GTFS data. It supports multi-modal transport (bus and walking) and displays results on an interactive map.

Requirements

  • JDK 17 or newer
  • MySQL server
  • JavaFX SDK 21 (the GUI runs with --module-path <javafx-sdk>/lib --add-modules javafx.controls,javafx.fxml,javafx.web)
  • The JAR dependencies in lib/ (already included in this repository)

Application Setup

  1. Download GTFS Data

    • Download the GTFS.zip file for the Netherlands.
    • Create a MySQL database named bcs7 and import the data into it.
  2. Configure Database Connection

    Credentials are read from environment variables, so nothing needs to be edited in the source code.

    Variable Required Default
    DB_USERNAME no root
    DB_PASSWORD yes empty
    DB_URL no jdbc:mysql://localhost:3306/bcs7?useSSL=false&allowPublicKeyRetrieval=true

    Set them in your shell before launching:

    export DB_USERNAME=your_mysql_user
    export DB_PASSWORD=your_mysql_password

    On Windows (PowerShell):

    $env:DB_USERNAME = "your_mysql_user"
    $env:DB_PASSWORD = "your_mysql_password"

    In IntelliJ IDEA you can also set them under Run > Edit Configurations > Environment variables.

  3. Initial Data Cleanup

    • On the first launch, call the cleanData method from DataGetter in the mapGUI.main method: dataGetter.cleanData();
    • This process cleans up excess data to improve query performance.
    • Important: Running cleanData takes some time, so after you have used it to clear your database, you should remove it from the main method for future launches to speed up the startup process.

Running the Application

  1. Launch

    • Run the main method in the Gui.mapGUI class to launch the application.
  2. Usage

    • The application allows you to input two postcodes. It only accepts postcodes within the vicinity of Maastricht.
    • If you do not input appropriate postcodes, it will display an error message.
    • Note: If the API throws an error, you may wish to look for an alternative API to call from. Try https://project12.ashish.nl/get_coordinates.

That's It

The application should now be ready to use for exploring public transport routes.

Enjoy!

About

Java-based public transport routing engine that calculates optimal paths, travel times, and distances using OpenStreetMap and GTFS data. Supports multi-modal transport (bus, walking) with offline capability and accurate, high-resolution map visualization. Designed for real-time performance and extensibility in urban mobility applications.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages