0.0
Repository is archived
No release in over 3 years
Low commit activity in last 3 years
gtfs-geojson is a Ruby utility to convert the shapes.txt file from a GTFS feed into a GeoJSON file.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

= 5.8.4
= 0.11.2

Runtime

 Project Readme

gtfs-geojson

gtfs-geojson is a Ruby utility to convert the shapes.txt file of a GTFS feed into a GeoJSON file. It uses the GTFS gem to validate GTFS feeds and wrap the feed data into usable objects. Two command-line utilities are also included with a gem install.

Installation

Add the following to your Gemfile.

gem 'gtfs-geojson'

or install the gem through the command line.

gem install `gtfs-geojson`

Command-Line Utilities

Convert a GTFS feed shapes.txt file into a GeoJSON file.

gtfs_to_geojson gtfs.zip output.geojson

Print a human-readable form of a GTFS-realtime feed.

gtfs-rt_to_json http://developer.mbta.com/lib/GTRTFS/Alerts/VehiclePositions.pb positions.json

Usage

require 'gtfs-geojson'
geojson = GTFS::GeoJSON.generate("gtfs.zip")
File.open("gtfs.geojson",'w') do { |f| f.write(geojson) }

Develop Locally

To develop locally, clone the repository and run bundler to setup the necessary gems.

bundle install

Run Tests

bundle exec rake

Run Tests and Collect Code Coverage

bundle exec rake coverage