Skip to main content

GTFS command-line tool and Python GTFS utility library

Project description

gtfsutils

GTFS command-line tool and Python GTFS utility library

Installation

To install the package, type:

pip install gtfsutils

Usage

The usage is illustrated in quickstart.ipynb.

The package can be also used as a command-line tool. Here is how to filter a GTFS file using a bounding box:

gtfsutils filter \
  --verbose \
  --bounds "[16.197, 47.999, 16.549, 48.301]" \
  -i data/vienna.gtfs.zip \
  -o data/vienna-filtered.gtfs.zip

Here is how to compute the bounding box of a GTFS file:

gtfsutils bounds -i data/vienna.gtfs.zip

For more information on the command-line interface, type:

gtfsutils --help
usage: gtfsutils [-h] [-i SRC] [-o DST] [--bounds BOUNDS] [-f OPERATION] [--overwrite] [-v] method

GTFS Utilities

positional arguments:
  method                GTFS method: filter, bounds, merge

optional arguments:
  -h, --help            show this help message and exit
  -i SRC, --input SRC   Input filepath
  -o DST, --output DST  Output filepath
  --bounds BOUNDS       Filter boundary
  -f OPERATION, --filter-operation OPERATION
                        Filter operation (within, intersects)
  --overwrite           Overwrite if exists
  -v, --verbose         Verbose output

License

This project is licensed under the MIT license. See the LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gtfsutils-0.0.4.tar.gz (7.8 kB view hashes)

Uploaded Source

Built Distribution

gtfsutils-0.0.4-py3-none-any.whl (8.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page