Package Exports
- gtfs-via-postgres
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gtfs-via-postgres) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
gtfs-via-postgres
Yet another tool to process GTFS using PostgreSQL.
Installation
npm install -g gtfs-via-postgresOr use npx. ✨
Usage
Usage:
gtfs-to-sql <gtfs-file> ...
Options:
--silent -s Don't show files being converted.
--require-dependencies -d Require files that the specified GTFS files depend
on to be specified as well (e.g. stop_times.txt
requires trips.txt). Default: false
--ignore-unsupported -u Ignore unsupported files. Default: false
Examples:
gtfs-to-sql -u some-gtfs/*.txt >gtfs.sqlSome notable limitations mentioned in the PostgreSQL 12 documentation on date/time types:
For
timestamp with time zone, the internally stored value is always in UTC (Universal Coordinated Time, traditionally known as Greenwich Mean Time, GMT). An input value that has an explicit time zone specified is converted to UTC using the appropriate offset for that time zone.
When a
timestamp with time zonevalue is output, it is always converted from UTC to the currenttimezonezone, and displayed as local time in that zone. To see the time in another time zone, either changetimezoneor use theAT TIME ZONEconstruct […].
Performance
On my Macbook 13" 2015 (Intel i5-5257U), converting the 457mb 2020-09-04 VBB GTFS feed took ~2:15.
Related
- gtfs-schema – PostgreSQL schemas for GTFS feeds.
- gtfs_SQL_importer – Quick & easy import of GTFS data into a SQL database. (Python)
- gtfsdb – Python library for converting GTFS files into a relational database. (Python)
- gtfspy – Public transport network analysis using Python and SQLite.
- GTFS Kit – A Python 3.6+ tool kit for analyzing General Transit Feed Specification (GTFS) data.
- GtfsToSql – Parses a GTFS feed into an SQL database (Java)
- gtfs-to-sqlite – A tool for generating an SQLite database from a GTFS feed. (Java)
- markusvalo/HSLtraffic – Scripts to create a PostgreSQL database for HSL GTFS-data. (plain SQL)
License
This project is dual-licensed: My contributions are licensed under the Prosperity Public License, contributions of other people are licensed as Apache 2.0.
This license allows you to use and share this software for noncommercial purposes for free and to try this software for commercial purposes for thirty days.
Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, doesn’t count as use for a commercial purpose.
Buy a commercial license or read more about why I sell private licenses for my projects.
Contributing
If you have a question or need support using gtfs-via-postgres, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, use the issues page.
By contributing, you agree to release your modifications under the Apache 2.0 license.