GithubHelp home page GithubHelp logo

gtfs-viz's Introduction

About

This Ruby script is used to convert a set of GTFS files into a SQLite database + GeoJSONs needed by the Transit Map web application that animates vehicles on a map based on timetables and network.

The script was tested on OSX machines with Ruby 2.x

Install

  • clone / download the copy of the repo on your machine
  • install required Ruby Gems

bundle install

Setup

  • create a folder inside ./gtfs-data and name it with your project information
    • the name of the folder can contain letters, digits, +, - characters only
  • in this folder unzip the GTFS dataset
  • edit the Rakefile and change the PROJECT_NAME constant with the folder name, i.e. sfmta
  • you are ready to parse the GTFS data if you have this folder structure and running rake -T shows the available tasks: http://screencast.com/t/9bt3i3lfL

Parse GTFS data

In a terminal window run the following Rake tasks:

cd /path/to/GTFS-viz

# Initialize folders and the SQLite DB
rake setup:init	

# Fill the DB tables defined in ./inc/gtfs_mapping.yml
rake parse:gtfs_2_sqlite

# Generate GeoJSON files from shapes.txt and stops.txt
# If the shapes.txt is missing from the GTFS dataset, generate one based on stops.txt
rake parse:shapes_2_geojson
rake parse:stops_2_geojson

# Generate KML files from shapes.txt and stops.txt
rake parse:gtfs_2_kml

# Find the position of the stops along the shapes, store them in ./tmp/sfmta/trips_shapes.json
rake parse:stops_interpolate

# Update DB trips and stop_times
rake parse:stops_trips_update

Check the contents of ./tmp/sfmta - http://screencast.com/t/V3r5TZBn0m

  • gtfs.db - SQLite DB tables of calendar.txt, routes.txt, stop_times.txt, stops.txt, trips.txt
  • gtfs_shapes.geojson, gtfs_stops.geojson - GeoJSON files of shapes.txt, stops.txt
  • gtfs_shapes.kml, gtfs_stops.kml - KML (Google Earth) files of shapes.txt, stops.txt

Visualize

You can open the GeoJSON files with QuantumGIS or any other GIS software. Same with the KML files which can be visualized using Google Earth.

If you want to create an animation of the GTFS data you will need to

  • download / clone the Transit Map web application
  • download / clone the Transit Map Route Icon PHP script
  • edit Rakefile and change the PATH_TO_APP_TRANSIT_SIMULATOR, PATH_TO_SCRIPT_ROUTE_ICON constants

Setup Fusion Tables API

  • create a project under API Console
  • enable Drive API and Fusion Tables API under APIs - screenshot
  • add a new Credential as Service Account and select P12 as key type - screenshot
  • save the key as client.p12 under inc/fusion_tables/client.p12
  • copy the email address which is [email protected] and assign it to API_CONSOLE_EMAIL_ADDRESS inside Rakefile - screenshot

Update Transit-Map project

  • Download / clone the Transit Map web application

  • Edit Rakefile and change the PATH_TO_APP_TRANSIT_SIMULATOR

  • In a terminal window run the following Rake tasks:

      # Populate FusionTables with shapes.txt and stops.txt
      rake project:deploy_fusiontables
    
      # Copy the files needed by the Transit Map web application
      rake project:deploy
    

Now, you should be able to see some action in your browser :)

Swiss railways(SBB) Check SBB network - http://maps.vasile.ch/transit-sbb/

License

Copyright (c) 2014-2015 Vasile Coțovanu - http://www.vasile.ch

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

  • The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

  • THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

gtfs-viz's People

Contributors

pichot avatar vasile avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gtfs-viz's Issues

Error in gtfs_2_sqlite

Hello, I've an error when running gtfs_2_sqlite:

nicolas@spiralo2:~/transports/GTFS-viz$ rake parse:gtfs_2_sqlite --trace
** Invoke parse:gtfs_2_sqlite (first_time)
** Execute parse:gtfs_2_sqlite
14:48:54 +0 : START SQL inserts from GTFS files
rm -f /home/nicolas/transports/GTFS-viz/tmp/TAG/gtfs.db
14:48:54 +0 : SQL INSERT calendar, 16 records
14:48:54 +0 : SQL INSERT routes, 13 records
14:48:54 +0 : SQL INSERT stop_times, 158699 records
rake aborted!
NoMethodError: undefined method length' for nil:NilClass /home/nicolas/transports/GTFS-viz/inc/gtfs.rb:345:invalidate_time'
/home/nicolas/transports/GTFS-viz/inc/gtfs.rb:70:in block in gtfs_to_sqlite' /home/nicolas/transports/GTFS-viz/inc/gtfs.rb:65:ineach'
/home/nicolas/transports/GTFS-viz/inc/gtfs.rb:65:in gtfs_to_sqlite' /home/nicolas/transports/GTFS-viz/inc/gtfs.rb:47:inblock in parse_file'
/home/nicolas/transports/GTFS-viz/inc/gtfs.rb:38:in foreach' /home/nicolas/transports/GTFS-viz/inc/gtfs.rb:38:inparse_file'
/home/nicolas/transports/GTFS-viz/Rakefile:77:in block (3 levels) in <top (required)>' /home/nicolas/transports/GTFS-viz/Rakefile:68:ineach'
/home/nicolas/transports/GTFS-viz/Rakefile:68:in block (2 levels) in <top (required)>' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:240:incall'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:240:in block in execute' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:235:ineach'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:235:in execute' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:179:inblock in invoke_with_call_chain'
/usr/lib/ruby/1.9.1/monitor.rb:211:in mon_synchronize' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:172:ininvoke_with_call_chain'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:165:in invoke' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:150:ininvoke_task'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:106:in block (2 levels) in top_level' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:106:ineach'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:106:in block in top_level' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:115:inrun_with_threads'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:100:in top_level' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:78:inblock in run'
/var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:176:in standard_exception_handling' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:75:inrun'
/var/lib/gems/1.9.1/gems/rake-10.3.2/bin/rake:33:in <top (required)>' /usr/local/bin/rake:23:inload'
/usr/local/bin/rake:23:in `

'
Tasks: TOP => parse:gtfs_2_sqlite

What's the problem?

Command failed with status (127)

C:\GTFS-viz>rake setup:init
rm -rf C:/GTFS-viz/tmp/sfmta
rake aborted!
Command failed with status (127): [rm -rf C:/GTFS-viz/tmp/sfmta...]
C:/GTFS-viz/Rakefile:49:in `block (2 levels) in <top (required)>'
Tasks: TOP => setup:init
(See full trace by running task with --trace)

Error in rake parse:gtfs_2_kml

Hi!

I think I've found what it seems a bug in your project... I've gone on executing commands so as to setup transit-map with a GTFS, but I'm facing a issue when executing the following command: rake parse:gtfs_2_kml.


joninazio@IN000-server:~/simulacion_gtfs/lurraldebus_pesa/GTFS-viz$ rake parse:gtfs_2_kml
/usr/local/lib/ruby/gems/2.0.0/gems/google-api-client-0.8.6/lib/google/api_client/environment.rb:35: warning: Insecure world writable dir /home/joninazio/automatizar/gtfsdb/bin in PATH, mode 040777
rake aborted!
Errno::ENOENT: No such file or directory - /home/joninazio/simulacion_gtfs/lurraldebus_pesa/GTFS-viz/inc/inc/templates/kml_placemark_shapes.xml
/home/joninazio/simulacion_gtfs/lurraldebus_pesa/GTFS-viz/inc/gtfs.rb:177:in initialize' /home/joninazio/simulacion_gtfs/lurraldebus_pesa/GTFS-viz/inc/gtfs.rb:177:inopen'
/home/joninazio/simulacion_gtfs/lurraldebus_pesa/GTFS-viz/inc/gtfs.rb:177:in block in geojson_to_kml' /home/joninazio/simulacion_gtfs/lurraldebus_pesa/GTFS-viz/inc/gtfs.rb:176:ineach'
/home/joninazio/simulacion_gtfs/lurraldebus_pesa/GTFS-viz/inc/gtfs.rb:176:in geojson_to_kml' /home/joninazio/simulacion_gtfs/lurraldebus_pesa/GTFS-viz/Rakefile:140:inblock (3 levels) in <top (required)>'
/home/joninazio/simulacion_gtfs/lurraldebus_pesa/GTFS-viz/Rakefile:139:in each' /home/joninazio/simulacion_gtfs/lurraldebus_pesa/GTFS-viz/Rakefile:139:inblock (2 levels) in <top (required)>'
Tasks: TOP => parse:gtfs_2_kml
(See full trace by running task with --trace)

Notice that the program it's looking for kml_placemark_shapes.xml file inside /home/joninazio/simulacion_gtfs/lurraldebus_pesa/GTFS-viz/inc/inc/templates/, shouldn't it be /home/joninazio/simulacion_gtfs/lurraldebus_pesa/GTFS-viz/inc/templates/?


No such file or directory - /home/joninazio/simulacion_gtfs/lurraldebus_pesa/GTFS-viz/inc/inc/templates/kml_placemark_shapes.xml
Could you lend me a hand?

Extra question: why am I getting the "Insecure world writable" warning? I've successfully cloned the project without the need of root (sudo) permission...

LoadError: cannot load such file -- google/api_client

$ bundle install
Resolving dependencies...
Using rake 10.5.0
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.8.4
Using thread_safe 0.3.5
Using tzinfo 1.2.2
Using activesupport 4.2.5.1
Using addressable 2.4.0
Using multipart-post 2.0.0
Using faraday 0.9.2
Using jwt 1.5.2
Using little-plugger 1.1.4
Using multi_json 1.11.2
Using logging 2.0.0
Using memoist 0.14.0
Using os 0.9.6
Using signet 0.7.2
Using googleauth 0.5.1
Using httpclient 2.7.1
Using hurley 0.2
Using mime-types-data 3.2015.1120
Using mime-types 3.0
Using uber 0.0.15
Using representable 2.3.0
Using retriable 2.1.0
Using thor 0.19.1
Using google-api-client 0.9.1
Using sqlite3 1.3.11
Using bundler 1.7.3
Your bundle is complete!

$ ruby -version
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
-e:1:in `<main>': undefined local variable or method `rsion' for main:Object (NameError)

$ rake setup:init
rake aborted!
LoadError: cannot load such file -- google/api_client
/root/GTFS-viz/inc/ft.rb:3:in `<top (required)>'
(See full trace by running task with --trace)

rake aborted! LoadError: cannot load such file -- google/api_client

I can't make the script work, I did "bundle install" and all ruby gems are installed.

here is the log:

rake setup:init --trace
rake aborted!
LoadError: cannot load such file -- google/api_client
/usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in require' /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in require'
/home/ubuntu/app/transit-map/GTFS-viz/inc/ft.rb:3:in <top (required)>' /var/lib/gems/2.7.0/gems/rake-13.0.6/lib/rake/rake_module.rb:29:in load'
/var/lib/gems/2.7.0/gems/rake-13.0.6/lib/rake/rake_module.rb:29:in load_rakefile' /var/lib/gems/2.7.0/gems/rake-13.0.6/lib/rake/default_loader.rb:11:in load'
/var/lib/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:788:in load_imports' /var/lib/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:718:in raw_load_rakefile'
/var/lib/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:104:in block in load_rakefile' /var/lib/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:186:in standard_exception_handling'
/var/lib/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:103:in load_rakefile' /var/lib/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:82:in block in run'
/var/lib/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:186:in standard_exception_handling' /var/lib/gems/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:80:in run'
/var/lib/gems/2.7.0/gems/rake-13.0.6/exe/rake:27:in <top (required)>' /usr/local/bin/rake:23:in load'
/usr/local/bin/rake:23:in `

'

Rake -T command failed with status (127)

HI,
I get an error running rake -T.(ruby 1.9.3 on Windows 7 64bit)
cp C:/Apps/GTFS-viz-master/inc/templates/ft_login.template.rb C:/Apps/GTFS-viz-m
aster/inc/ft_login.rb
rake aborted!
Command failed with status (127): [cp C:/Apps/GTFS-viz-master/inc/templates/f...
]
C:/Apps/GTFS-viz-master/Rakefile:38:in `<top (required)>'
(See full trace by running task with --trace)

I know nothing about ruby. But what I figured out so far is that on line 38 the rakefile is trying to execute a bash command. Since I am running windows I get the command failed error.

Cannot convert the files

getting these error when follow the steps

(See full trace by running task with --trace)
7ctechs-Mac-mini:GTFS-viz-master 7ctech$ rake project:deploy_fusiontables
rake aborted!
no such file to load -- fusion_tables
/Users/7ctech/Downloads/GTFS-viz-master/rakefile:417
Tasks: TOP => project:deploy_fusiontables
(See full trace by running task with --trace)
7ctechs-Mac-mini:GTFS-viz-master 7ctech$ rake project:deploy_fusiontables
rake aborted!
no such file to load -- fusion_tables
/Users/7ctech/Downloads/GTFS-viz-master/rakefile:417
Tasks: TOP => project:deploy_fusiontables
(See full trace by running task with --trace)
7ctechs-Mac-mini:GTFS-viz-master 7ctech$ rake project:deploy_fusiontables --trace
** Invoke project:deploy_fusiontables (first_time)
** Execute project:deploy_fusiontables
rake aborted!
no such file to load -- fusion_tables
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:inrequire'
/Users/7ctech/Downloads/GTFS-viz-master/rakefile:417
/Library/Ruby/Gems/1.8/gems/rake-10.1.1/lib/rake/task.rb:236:in call' /Library/Ruby/Gems/1.8/gems/rake-10.1.1/lib/rake/task.rb:236:inexecute'
/Library/Ruby/Gems/1.8/gems/rake-10.1.1/lib/rake/task.rb:231:in each' /Library/Ruby/Gems/1.8/gems/rake-10.1.1/lib/rake/task.rb:231:inexecute'
/Library/Ruby/Gems/1.8/gems/rake-10.1.1/lib/rake/task.rb:175:in invoke_with_call_chain' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:insynchronize'
/Library/Ruby/Gems/1.8/gems/rake-10.1.1/lib/rake/task.rb:168:in invoke_with_call_chain' /Library/Ruby/Gems/1.8/gems/rake-10.1.1/lib/rake/task.rb:161:ininvoke'
/Library/Ruby/Gems/1.8/gems/rake-10.1.1/lib/rake/application.rb:149:in invoke_task' /Library/Ruby/Gems/1.8/gems/rake-10.1.1/lib/rake/application.rb:106:intop_level'
/Library/Ruby/Gems/1.8/gems/rake-10.1.1/lib/rake/application.rb:106:in each' /Library/Ruby/Gems/1.8/gems/rake-10.1.1/lib/rake/application.rb:106:intop_level'
/Library/Ruby/Gems/1.8/gems/rake-10.1.1/lib/rake/application.rb:115:in run_with_threads' /Library/Ruby/Gems/1.8/gems/rake-10.1.1/lib/rake/application.rb:100:intop_level'
/Library/Ruby/Gems/1.8/gems/rake-10.1.1/lib/rake/application.rb:78:in run' /Library/Ruby/Gems/1.8/gems/rake-10.1.1/lib/rake/application.rb:165:instandard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-10.1.1/lib/rake/application.rb:75:in run' /Library/Ruby/Gems/1.8/gems/rake-10.1.1/bin/rake:33 /usr/bin/rake:19:inload'
/usr/bin/rake:19
Tasks: TOP => project:deploy_fusiontables
7ctechs-Mac-mini:GTFS-viz-master 7ctech$

Please guide to configure Google Drive API/SDK

screen shot 2014-02-17 at 11 11 28 pm
Hi Vasile!
Can you please guide me that how can i obtain this information:
FT_USERNAME = 'Google_Drive_Username'
FT_PASSWORD = 'Google_Drive_Password'
FT_KEY = 'API_Key_From_Google_API_Console'

As i tried to get the credentails from console but the script returs the error of authentication 403 with google drive...

Please tell me how to setup the Google Drive?

unable to populate FusionTables

Hi,
when I run rake project:deploy_fusiontables --trace I have:

rake aborted!
SyntaxError: /home/ubuntu/GTFS-viz/Rakefile:15: unknown regexp options - www
/home/ubuntu/GTFS-viz/Rakefile:17: unknown regexp options - www
/home/ubuntu/GTFS-viz/Rakefile:21: syntax error, unexpected tIVAR, expecting keyword_do or '{' or '('
...IL_ADDRESS = [email protected]...
...                               ^
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/rake_module.rb:28:in `load'
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/rake_module.rb:28:in `load_rakefile'
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:686:in `raw_load_rakefile'
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:96:in `block in load_rakefile'
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:178:in `standard_exception_handling'
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:95:in `load_rakefile'
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:79:in `block in run'
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:178:in `standard_exception_handling'
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:77:in `run'
/var/lib/gems/2.3.0/gems/rake-11.2.2/exe/rake:27:in `<top (required)>'
/usr/local/bin/rake:23:in `load'
/usr/local/bin/rake:23:in `<main>'

Any solution for me? I have no idea where to start.

Thank you

localhost/user/api/getTrip Does not exist

Getting Error 404 whenever I put my own GTFS file in - picks up the routes and the stops but doesnt pick up the any of the trips and hence cant simulate the vehicles. Its making a call to localhost/user/api/getTrip - but when I navigate to localhost/user/api/ - getTrip[time here], does not exist?

Fatal error: Call to undefined function imagettfbbox()

Hi there, I'm trying to run the last part of the "Visualize" (rake project:deploy) section and am running into the following error:

users-MacBook-Pro:GTFS-viz user$ rake project:deploy --trace
** Invoke project:deploy (first_time)
** Execute project:deploy
rm -rf /Users/user/Dropbox/GTFS-viz/transit-map-master/api/geojson/*
rm -rf /Users/user/Dropbox/GTFS-viz/transit-map-master/api/gtfs-data
mkdir /Users/user/Dropbox/GTFS-viz/transit-map-master/api/gtfs-data
cp /Users/user/GD/GTFS-viz/tmp/tucson/gtfs.db /Users/user/Dropbox/GTFS-viz/transit-map-master/api/gtfs-data/gtfs.db
cp /Users/user/GD/GTFS-viz/tmp/tucson/gtfs_shapes.geojson /Users/user/Dropbox/GTFS-viz/transit-map-master/api/geojson/gtfs_shapes.geojson
cp /Users/user/GD/GTFS-viz/tmp/tucson/gtfs_stops.geojson /Users/user/Dropbox/GTFS-viz/transit-map-master/api/geojson/gtfs_stops.geojson
rm -rf /Users/user/Dropbox/GTFS-viz/transit-map-master/api/tmp && mkdir /Users/user/Dropbox/GTFS-viz/transit-map-master/api/tmp && chmod 0777 /Users/user/Dropbox/GTFS-viz/transit-map-master/api/tmp
mkdir -p /Users/user/Dropbox/GTFS-viz/transit-map-master/api/tmp/cache/db && chmod 0777 /Users/user/Dropbox/GTFS-viz/transit-map-master/api/tmp/cache/db
** Invoke project:update_settings_ft (first_time)
** Execute project:update_settings_ft
** Invoke project:update_settings_map (first_time)
** Execute project:update_settings_map
** Invoke project:update_settings_routes (first_time)
** Execute project:update_settings_routes
rm -f /Users/user/Dropbox/GTFS-viz/transit-map-master/static/images/route_icons/*.png
php /Users/user/Dropbox/GTFS-viz/transit-map-route-icon-master/route_icon.php bg=FFD457 fg=000000 t="1"

Fatal error: Call to undefined function imagettfbbox() in /Users/user/Dropbox/GTFS-viz/transit-map-route-icon-master/route_icon.php on line 69
rake aborted!
Command failed with status (255): [php /Users/user/Dropbox/GTFS-viz/trans...]
/Users/user/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/file_utils.rb:66:in `block in create_shell_runner'
/Users/user/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/file_utils.rb:57:in `call'
/Users/user/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/file_utils.rb:57:in `sh'
/Users/user/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/file_utils_ext.rb:37:in `sh'
/Users/user/GD/GTFS-viz/Rakefile:543:in `block (3 levels) in <top (required)>'
/Users/user/GD/GTFS-viz/Rakefile:528:in `each'
/Users/user/GD/GTFS-viz/Rakefile:528:in `block (2 levels) in <top (required)>'
/Users/user/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/task.rb:240:in `call'
/Users/user/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/task.rb:240:in `block in execute'
/Users/user/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/task.rb:235:in `each'
/Users/user/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/task.rb:235:in `execute'
/Users/user/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/task.rb:179:in `block in invoke_with_call_chain'
/Users/user/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
/Users/user/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/task.rb:172:in `invoke_with_call_chain'
/Users/user/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/task.rb:165:in `invoke'
/Users/user/GD/GTFS-viz/Rakefile:431:in `block (2 levels) in <top (required)>'
/Users/user/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/task.rb:240:in `call'
/Users/user/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/task.rb:240:in `block in execute'
/Users/user/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/task.rb:235:in `each'
/Users/user/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/task.rb:235:in `execute'
/Users/user/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/task.rb:179:in `block in invoke_with_call_chain'
/Users/user/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
/Users/user/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/task.rb:172:in `invoke_with_call_chain'
/Users/user/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/task.rb:165:in `invoke'
/Users/user/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/application.rb:150:in `invoke_task'
/Users/user/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/application.rb:106:in `block (2 levels) in top_level'
/Users/user/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/application.rb:106:in `each'
/Users/user/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/application.rb:106:in `block in top_level'
/Users/user/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/application.rb:115:in `run_with_threads'
/Users/user/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/application.rb:100:in `top_level'
/Users/user/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/application.rb:78:in `block in run'
/Users/user/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/application.rb:176:in `standard_exception_handling'
/Users/user/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/application.rb:75:in `run'
/Users/user/.rvm/rubies/ruby-2.2.3/bin/rake:33:in `<main>'
/Users/user/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `eval'
/Users/user/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => project:update_settings_routes

Do you have any advice on how I could handle this?

NoMethodError: undefined method `[]' for nil:NilClass

Hi Vasile and thanks for your great work. I ahve a problem running your code. When I run the rake parse:stops_interpolate function I hit on this error:

sam@sam-VirtualBox-Ubuntu:/media/sf_GTFS-viz$ rake parse:stops_interpolate
22:37:40 +0 : START stops_interpolate
rake aborted!
NoMethodError: undefined method `[]' for nil:NilClass
/media/sf_GTFS-viz/Rakefile:205:in `block (3 levels) in <top (required)>'
/media/sf_GTFS-viz/Rakefile:168:in `each'
/media/sf_GTFS-viz/Rakefile:168:in `block (2 levels) in <top (required)>'
Tasks: TOP => parse:stops_interpolate
(See full trace by running task with --trace)

Any ideas?
You can download my dataset from http://geodata.gov.gr/dataset/244cfb87-21a0-4f9f-90af-25e9a232af41/resource/d94179a0-a2bd-432f-8c5e-e05eae2886cf/download/googletransit.zip

Error: required GTFS table calendar not found

I try to read data which doesn't include a calender.txt because I have a calendar_dates.txt which includes ALL dates of service. That results in an error because calender.txt is not found. How can I solve this?

The error occurs at this step:

rake parse:gtfs_2_sqlite

Cannot convert files

Hi,

I followed all the steps but I am stuck towards the end :(
I tried to populate the fusion tables by running the following command:

Command:
rake project:deploy_fusiontables

Resonse:
rake aborted!
cannot load such file -- fusion_tables
Tasks: TOP => project:deploy_fusiontables

Do I need a connection to Google to perform this task behind the firewall?
Any help is appreciated. Thanks!

System: Redhat EL6 and Ruby 1.9x

The detailed error is:

** Invoke project:deploy_fusiontables (first_time)
** Execute project:deploy_fusiontables
rake aborted!
cannot load such file -- fusion_tables
/usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require' /usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire'
/home/tmscent/ruby/GTFS/Rakefile:431:in block (2 levels) in <top (required)>' /usr/local/lib/ruby/1.9.1/rake/task.rb:205:incall'
/usr/local/lib/ruby/1.9.1/rake/task.rb:205:in block in execute' /usr/local/lib/ruby/1.9.1/rake/task.rb:200:ineach'
/usr/local/lib/ruby/1.9.1/rake/task.rb:200:in execute' /usr/local/lib/ruby/1.9.1/rake/task.rb:158:inblock in invoke_with_call_chain'
/usr/local/lib/ruby/1.9.1/monitor.rb:211:in mon_synchronize' /usr/local/lib/ruby/1.9.1/rake/task.rb:151:ininvoke_with_call_chain'
/usr/local/lib/ruby/1.9.1/rake/task.rb:144:in invoke' /usr/local/lib/ruby/1.9.1/rake/application.rb:116:ininvoke_task'
/usr/local/lib/ruby/1.9.1/rake/application.rb:94:in block (2 levels) in top_level' /usr/local/lib/ruby/1.9.1/rake/application.rb:94:ineach'
/usr/local/lib/ruby/1.9.1/rake/application.rb:94:in block in top_level' /usr/local/lib/ruby/1.9.1/rake/application.rb:133:instandard_exception_handling'
/usr/local/lib/ruby/1.9.1/rake/application.rb:88:in top_level' /usr/local/lib/ruby/1.9.1/rake/application.rb:66:inblock in run'
/usr/local/lib/ruby/1.9.1/rake/application.rb:133:in standard_exception_handling' /usr/local/lib/ruby/1.9.1/rake/application.rb:63:inrun'
/usr/local/bin/rake:32:in `

'
Tasks: TOP => project:deploy_fusiontables

Regards
Renju

Station Not working as before.

Hi ,
I managed to convert the project into a working form after a quite bugs, now stations are not showing on the map neither we can click on the station to get the bus routes from it.
WE need to zoom alot to see the station that doesn't work when we click on it

Fusion table by using recent changes gives request access issue

Hi @vasile, I have used your script which you have updated 3 days ago,
All the script run successfully but when i goto fusiontable link to share table publicly, It give me error that I am not author GTFS-viz is the author.
It is also taking time to import, May be it is because request access issue.
capture image

P.S. I have follow all the setting for fusion table mentioned in GTFS-viz.
Waiting to hear you soon.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.