A GTFS Schedule (static) General Transit Feed Specification (GTFS) feed validator
This README contains information for the master branch of this project, which is under active development. If you'd like to view documentation for past releases of the project, see:
This is a command-line tool written in Java that performs the following steps:
- Loads input GTFS zip file from a URL or disk
- Checks file integrity, numeric type parsing and ranges as well as string format according to the GTFS Schedule specification
- Performs GTFS business rule validation
Run the app via command line
- Install Java 11 or higher
- Download the latest snapshot jar of the validator from the artifacts generated by the
Test Package Documentworkflow. See detailed instructions here.
To validate a GTFS dataset on your computer:
java -jar gtfs-validator-v-snapshot_cli.jar -i /myDirectory/gtfs.zip -o output -c ca
To download and validate a GTFS dataset from a URL:
java -jar gtfs-validator-v-snapshot_cli.jar -u https://www.abc.com/gtfs.zip -o output -c ca
-i: the path to the GTFS file (e.g.,
-u: the fully qualified URL to the GTFS file (e.g.,
-o: the path where the validation report will be stored (e.g.,
-c: the country code of the feed as a valid ISO two letter country code (e.g.,
us). It can be either lower or upper case (e.g.
-cis not provided or country code is unknown, phone numbers will be validated if they start by
-t: the number of Java threads to use
More detailed instructions are on our "Usage" page.
Run the app using Docker
- Download and install Docker
- Pull the latest Docker image for this project. For example,
docker pull ghcr.io/mobilitydata/gtfs-validatorfor the latest snapshot version of the validator.
For Mac and Linux
To run the Docker image in a new container:
docker run -v /myDirectory:/theContainerDirectory -it ghcr.io/mobilitydata/gtfs-validator:latest
-v /myDirectory:/theContainerDirectory: syntax to share directories and data between the container and the host (your computer). With the above command, any files that you place in
/myDirectoryon the host will show up in
/theContainerDirectoryinside the container and vice versa.
NOTE: On Windows, you must provide the local volume (e.g.,
c:) as well:
... c:/myDirectory:/theContainerDirectory ...
The validator can then be executed via bash commands. See the preceeding instructions for command line usage.
Possible future rules for:
Build the code
The architecture of the
gtfs-validator is described on our Architecture page.
Code licensed under the Apache 2.0 License.
We welcome contributions to the project! Please check out our Contribution guidelines for details.