@ltbuses/gtfs-parser
v2.1.0
Published
Parses GTFS data into usable structures using streams
Downloads
37
Readme
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-parserUsage
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.
