Import GTFS Schedule datasets into PostgreSQL for efficient querying, analysis, and GraphQL/RESTful API access. Current stable version 4.11.1, released regularly, requires PostgreSQL >=14 and Node.js >=20.17. Handles daylight saving time correctly, supports frequencies.txt, and creates joined views. Key differentiators: optimized for PostgreSQL query planner, time-expanded views for routing, and PostGraphile/PostgREST integration. Peer dependencies include postgraphile, @graphile-contrib/pg-simplify-inflector, and @graphile/postgis.
npm install gtfs-via-postgresNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Imports GTFS CSV files (unzipped) into a PostgreSQL database using the default configuration. Requires PostgreSQL >=14 and Node.js >=20.17.
Use import syntax or dynamic import().
Upgrade Node.js to >=20.17 or use v3.x (if still available).
Upgrade PostgreSQL to >=14.
Unzip the GTFS feed into a directory of CSV files before passing to importGtfsViaPostgres.
Install PostGIS extension or disable its creation via configuration if not needed.
Use import { importGtfsViaPostgres } from 'gtfs-via-postgres' or dynamic import().Ensure pg >=8 is installed. npm install pg@8
Switch the importing module to ES module (type: "module" in package.json) or use dynamic import().