Build CUBE 6 PT transit line file from GTFS data


Product(s): CUBE Voyager
Version(s): 6.4.x
Area: Public Transport

 

Introduction

Google Transit Feed Specifications (GTFS) are a set a standards defining common formats for sharing public transit data such as transit system information, route alignments, service schedules, individual trip details etc. GTFS is becoming the de-facto format for sharing public transit data. More information on GTFS can be found at https://gtfs.org/

GTFS data from transit agencies could contain a wealth of information useful for transportation planners for developing their transit networks. Many transit agencies publish their GTFS data on to public repositories or through their own channels. You can find a extensive collection of GTFS data at https://mobilitydatabase.org/

GTFS data has found common use among transportation modelers as a source to build public transport network inputs for their travel demand model. In this article, we will provide a CUBE 6 catalog for converting GTFS data to CUBE 6 Voyager PT line data. The following items are discussed below

Solution

Set-up

The tool for converting GTFS data is provided as a CUBE 6 Catalog.You can download the zipped catalog from here. The catalog has a CUBE 6 Voyager NETWORK step to write out link and node data which is passed on to a Python script along with the GTFS datasets. The final outcome is a PT line file compatible with the input highway network.

Download the catalog and unzip it. Inside the unzipped folder, you should see the following folder structure:

This catalog has been tested to work on Python 3.12. If you do not have Python 3.12 already installed, please download and install from https://www.python.org/downloads/ 

The catalog requires the following Python packages which can be installed with pip.

Below are instructions for setting up these packages

GTFS Kit:

  1. Open command window and cd into the Python 3.12 installation directory
  2. Run command:scripts\pip install gtfs_kit

NetworkX:

  1. Open command window and cd into the Python 3.12 installation directory
  2. Run command:scripts\pip install networkx

Rtree:

  1. Open command window and cd into the Python 3.12 installation directory
  2. Run command:scripts\pip install Rtree

Input Data

There are two main inputs to this catalog:

Run parameters

The following run parameters are set-up as scenario keys.

Output

The output CUBE 6 PT line file (PTlines.lin) will be in the scenario directory. There is a dummy PT program box set-up in the application to open the file in the network window.

The output file can also be opened from the data panel under the outputs folder.

Limitations/Considerations