@ltbuses/gtfs-parser

2.1.0 • Public • Published

LTBuses GTFS Parse

This is a simple parser the takes a stream containing a GTFS-formatted zip file, and extracts the data relevant to the LTBuses applications.

It uses unzip-stream to extract the data on the fly, without having to completely unpack the entire zip file.

The current result format is very specific to what is needed for the LTBuses apps, which currently only supports the LTC buses in London, Ontario.

Installation

npm install @ltbuses/gtfs-parser

Usage

const fs = require('fs');
const GtfsParser = require('@ltbuses/gtfs-parser');

const transitZip = fs.createReadStream('google_transit.zip');
const gtfsParser = new GtfsParser(transitZip);

gtfsParser.getData().then((gtfs) => {
  console.log(gtfs.getStops());
});

See the developer documentation for full details.

/@ltbuses/gtfs-parser/

    Package Sidebar

    Install

    npm i @ltbuses/gtfs-parser

    Weekly Downloads

    8

    Version

    2.1.0

    License

    MIT

    Unpacked Size

    20.1 kB

    Total Files

    12

    Last publish

    Collaborators

    • mikegossmann