Skip to content
This repository has been archived by the owner on Mar 11, 2020. It is now read-only.
/ diet-gtfs Public archive

Trim down a GTFS feed, reducing it to a region given by a lat, lon range.

License

Notifications You must be signed in to change notification settings

sensiblecodeio/diet-gtfs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 

Repository files navigation

diet-gtfs

Trim your GTFS feeds down to a suitable fighting weight for battling with transit data, based on selecting a lat/lon "rectangle".

Why?

We're currently interested in providing only a small part of a large countrywide GTFS feed, for collaborators on a project using OpenTripPlanner.

Unfortunately, large GTFS feeds are currently slow to load in OpenTripPlanner.

Tools such as the onebusaway transformer exist, but they can be very slow to process large feeds, even to do something like throwing the bulk of the data away.

What?

This is a simple Python 3 module that loads in an unzipped GTFS feed, and outputs trimmed files that contain only details for a region inside a lat/lon "rectangle".

It currently needs an output directory cleaned creating.

It's using the standard library only, so no external requirements.

Right now, it's hardcoded to this Netherlands GTFS feed (see this issue which needs resolving). In the meantime, you could adjust the column index numbers to match the appropriate columns in your files.

How?

python3 diet_gtfs.py min_lat max_lat min_lon max_lon

e.g.

python3 diet_gtfs.py 51.3 51.5 5.3 5.8

About

Trim down a GTFS feed, reducing it to a region given by a lat, lon range.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages