Skip to content
Java tool that validates General Transit Feed Specification (GTFS)-realtime feeds
Java JavaScript HTML CSS
Branch: master
Clone or download
Pull request Compare This branch is 107 commits behind CUTR-at-USF:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
.mvn
src
.gitignore
.travis.yml
LICENSE
README.md
RULES.md
pom.xml

README.md

GTFS-realtime Validator Build Status Join the GTFS-realtime chat

A tool that validates General Transit Feed Specification (GTFS)-realtime feeds

Quick start

Please note that this project is still under active development and is in an early alpha state.

  1. Install Java Development Kit (JDK) 1.8 or higher
  2. Download the latest alpha build:
  3. From the command line run java -Djsse.enableSNIExtension=false -jar gtfs-rt-validator-1.0.0-SNAPSHOT.jar
  4. When prompted, in your browser go to http://localhost:8080
  5. Enter your General Transit Feed Specification (GTFS)-realtime and GTFS feed URLs and click "Start". Example feeds:

Please note that if you're using https URLS, you'll need to use the -Djsse.enableSNIExtension=false command-line parameter or install the Java Cryptography Extension (JCE) - see the Prerequisites section for details.

Rules

Have a suggestion for a new rule? Open an issue with the "new rule" label.

Building the project

Prerequisites

The GTFS-Realtime Validator is implemented as a web application, with the backend code written in Java. An instance of the Jetty embedded server is used to run the application.

Following are the requirements to get the project up and running:

If you're using https URLs for GTFS or GTFS-rt feeds, either:

  • Use the -Djsse.enableSNIExtension=false parameter when running the tool
  • Install the Java Cryptography Extension (JCE) - You will need to replace the US_export_policy.jar and local_policy.jar files in your JVM /security directory, such as C:\Program Files\Java\jdk1.8.0_73\jre\lib\security, with the JAR files in the JCE Extension download.

1. Build the project

From the command-line, run:

mvn package

This will generate an executable file in the target/ directory with all the dependencies needed to run the application.

Note that this might take a while - this project also builds and packages the gtfs-validator so a static GTFS validation report can be seen within the GTFS-rt validator tool.

If you're going to be rebuilding the project frequently (e.g., editing source code), we suggest you load the project as Maven project in an IDE like IntelliJ or Netbeans.

2. Run the application

From the command-line, run:

java -Djsse.enableSNIExtension=false -jar target/gtfs-rt-validator-1.0.0-SNAPSHOT.jar

You should see some output, and a message saying Go to http://localhost:8080 in your browser.

3. View the application

Once the application has been started, you can enter URLs for the feeds you'd like to have validated at:

http://localhost:8080

Configuration options

Logging

If you'd like to change the logging level, for example to see all debug statements, in src/main/resources/simplelogger.properties change the following line to say DEBUG:

org.slf4j.simpleLogger.defaultLogLevel=DEBUG

DEBUG level will show the output for all rule validation in the log.

WARN will show a smaller number of informational messages.

Port number

Port 8080 is used by default. If you'd like to change the port number (e.g., port 80), you can use the command line parameter -port 80:

java -jar target/gtfs-rt-validator-1.0.0-SNAPSHOT.jar -port 80

Database

We use Hibernate to manage data persistence to a database. To allow you to get the tool up and running quickly, we use the embedded HSQLDB by default. This is not recommended for a production deployment.

Hibernate configuration can be changed in src/main/resources/hibernate.cfg.xml to store data in any relational database. You might want to check out the following resources for getting started:

A list of all the dialect properties for specific database versions is shown here.

Docker

Want to run this in Docker? Check out gtfs-realtime-validator-docker.

Acknowledgements

This project was funded by the National Institute for Transportation Communities (NITC) via the project "Overcoming Barriers for the Wide-scale Adoption of Standardized Real-time Transit Information". It also includes work funded under the 2015 Google Summer of Code.

You can’t perform that action at this time.