Extract GTFS colors for routes.txt (III)

Image result for hammer chiselThe code on GitHub

As announced in the part II of this series of articles, I pushed the code for the tool on GitHub.  You can find the repository at the following address: https://github.com/kagix/ratptools. Feel free to use it. Feel free to improve it.

The java program scans all the PNG images in the current folder and generates two kinds of reports:

  • a tabular one
  • a CSV one (comma separated values )

The to reports are printed to the screen.  You can redirect them into a file. I hope it will help those who want to use bus line colors as close as possible to the official ones. Again, this project is completely independent, so nothing is guaranteed 100%. So far, I believe the results are pretty close to the official colors.

Image result for java coffeeRemarks

The image loading part uses pure Java, thus the presence of AWT. If you know a better way, feel free to do so.  I tried to split the stuff in easy manageable parts.

My first computer ran Millennium, the second ran  Vista. Don’t ask me why I left the Windows world for Unix. That’s why the forward slash and back slash  prefix part has been tested only on Unix.

Image result for colorsThe code is not optimized for speed, and I believe it should be run once every week. I can’t wait to see the new bus lines that will be created in the near future. What colors will be used ? Future will tell.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s