Skip to main content

A Python tool to convert TransXchange data into GTFS.

Project description


build status

This is a small library to convert transit data from TransXchange format into GTFS -format that can be used with various routing engines such as OpenTripPlanner.


This package is still in a Beta-phase, so use it at your own risk. Requires more testing. If you find an issue, you can contribute and help solving them by raising an issue.


  • Reads TransXchange xml-files and converts into GTFS feed with all necessary information according the General Transit Feed Specification.
  • Combines multiple TransXchange files into a single GTFS feed if present in the same folder.
  • Uses multiprocessing to parallelize the conversion process.
  • Parses dates of non-operation (bank holidays etc.) which are written to calendar_dates.txt.
  • Uses NaPTAN stops.


The package is available at PyPi and you can install it with:

$ pip install transx2gtfs

Library works and is being tested with Python versions 3.6, 3.7 and 3.8.

Basic usage

After you have installed the library you can use it in a similar manner as any Python library:

>>> import transx2gtfs
>>> data_dir_for_transxchange_files = "data/my_transxchange_files"
>>> output_path = "data/"
>>> transx2gtfs.convert(data_dir_for_transxchange_files, output_path)

After you have successfully converted the TransXchange into GTFS, you can start doing multimodal routing with your favourite routing engine such as OpenTripPlanner:



If you use this tool for research purposes, we encourage you to cite this work:

  • TODO: Add Zenodo


  • Henrikki Tenkanen, University College London

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

transx2gtfs-0.3.2.tar.gz (8.2 MB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page