All Projects → planarnetwork → transxchange2gtfs

planarnetwork / transxchange2gtfs

Licence: other
tool to convert transxchange data into a GTFS feed

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to transxchange2gtfs

public-transit-tools
Tools for working with GTFS public transit data in ArcGIS
Stars: ✭ 126 (+384.62%)
Mutual labels:  transit, gtfs, transport
Tidytransit
R package for working with the General Transit Feed Specification (GTFS)
Stars: ✭ 84 (+223.08%)
Mutual labels:  transit, gtfs, transport
european-transport-operators
NOT UP-TO-DATE ANYMORE, UNMAINTAINED. CHECK european-transport-feeds INSTEAD. List of european long-distance transport operators, available API endpoints, GTFS feeds and client modules.
Stars: ✭ 47 (+80.77%)
Mutual labels:  transit, gtfs, transport
open-bus
🚌 Analysing Israel's public transport data
Stars: ✭ 65 (+150%)
Mutual labels:  transit, gtfs, transport
Loader
deploy
Stars: ✭ 6 (-76.92%)
Mutual labels:  transit, gtfs
Onebusaway Application Modules
The core OneBusAway application suite.
Stars: ✭ 174 (+569.23%)
Mutual labels:  transit, gtfs
Rrrr
RRRR rapid real-time routing
Stars: ✭ 134 (+415.38%)
Mutual labels:  transit, gtfs
Hafas Client
JavaScript client for HAFAS public transport APIs.
Stars: ✭ 125 (+380.77%)
Mutual labels:  transit, transport
Mapnificent
Mapnificent shows you areas you can reach with public transport in a given time.
Stars: ✭ 302 (+1061.54%)
Mutual labels:  transit, gtfs
European Transport Modules
[DISCONTINUED in favour of public-transport-operators] Collection of european transport JavaScript modules.
Stars: ✭ 9 (-65.38%)
Mutual labels:  transit, transport
waka
Your realtime guide to public transport in New Zealand
Stars: ✭ 37 (+42.31%)
Mutual labels:  transit, transport
nepomuk
A public transit router for GTFS feeds (currently only static) written in modern c++
Stars: ✭ 22 (-15.38%)
Mutual labels:  transit, gtfs
Awesome Transit
Community list of transit APIs, apps, datasets, research, and software 🚌🌟🚋🌟🚂
Stars: ✭ 713 (+2642.31%)
Mutual labels:  transit, gtfs
R5
Routing engine for multimodal (transit/bike/walk/car) networks with a particular focus on public transit.
Stars: ✭ 153 (+488.46%)
Mutual labels:  transit, gtfs
Node Gtfs
Import GTFS transit data into SQLite and query routes, stops, times, fares and more.
Stars: ✭ 323 (+1142.31%)
Mutual labels:  transit, gtfs
Mobility Explorer
Understand transportation networks around the world using Transitland open data and Valhalla routing engine APIs
Stars: ✭ 31 (+19.23%)
Mutual labels:  transit, gtfs
Vbb Cli
A CLI for Berlin & Brandenburg public transport.
Stars: ✭ 70 (+169.23%)
Mutual labels:  transit, transport
Transitland Datastore
Transitland's centralized web service API for both querying and editing aggregated transit data from around the world
Stars: ✭ 101 (+288.46%)
Mutual labels:  transit, gtfs
Gtfs To Html
Build human readable transit timetables as HTML or PDF from GTFS.
Stars: ✭ 119 (+357.69%)
Mutual labels:  transit, gtfs
vbb-rest
An HTTP API for Berlin & Brandenburg public transport.
Stars: ✭ 104 (+300%)
Mutual labels:  transit, transport

transxchange2gtfs

Travis npm David

transxchange2gtfs converts TransXChange timetable data into a GTFS zip.

Comparison

There are other similar projects, each with their own merits. This tool has some features not found in the others:

  • Smaller output - identical calendars are reused
  • Better handling of bank holidays
  • Built in NaPTAN data (stop names, longitude, latitude)
  • Ability to process multiple files, including zips
  • Low memory usage - most large files use less than 1GB, processing the entire UK data set requires 2GB
  • Generates interchange time and transfers to nearby stops

Installation

Please note that zip/unzip and node 14.x or above are required. As zip/unzip are required this program will not currently run on Windows.

transxchange2gtfs is a CLI tool that can be installed via NPM:

npm install -g transxchange2gtfs

or used directly with npx:

npx transxchange2gtfs ...

Usage

It can be run by specifying the input and output files as CLI arguments:

transxchange2gtfs transxchange1.xml transxchange2.xml gtfs-output.zip

Or using zip files:

transxchange2gtfs multiple-transxchange-files.zip /path/*.zip single-transxchange.xml gtfs-output.zip

Prior to version 1.9.0 nested zip files we're ignored. They are now processed recursively.

On occasion, a large dataset will cause a heap out of memory issue. In this case, set the NODE_OPTIONS environment variable to increase the heap size. For example to set to 8GiB, in a linux shell:

NODE_OPTIONS=--max-old-space-size=8192 transxchange2gtfs transxchange.zip gtfs-output.zip

It's possible to set the default agency URL, language and timezone:

AGENCY_URL=http://agency.com AGENCY_TIMEZONE=Europe/London AGENCY_LANG=en transxchange2gtfs transxchange.zip gtfs-output.zip

On first run transxchange2gtfs will download the latest Stop data from NaPTAN. If you would like to force a refresh of the data add --update-stops. Alternatively you can skip downloading the stop data by adding --skip-stops.

transxchange2gtfs --update-stops  transxchange.zip gtfs-output.zip

Requirements

Node.js version >= 12 is required.

Notes

  • All stop times are left in the original timezones (assumed to be local time).
  • It is assumed that any stops in different TransXChange documents with the same ATCO are the same stop.
  • Stop data is derived from NaPTAN.
  • TransXChange is a bizarre and over-engineered standard, there are probably edge cases that have not been covered.
  • A MySQL for the GTFS files is provided in the resource folder, along with an import script.

Contributing

Issues and PRs are very welcome. To get the project set up run

git clone [email protected]:planarnetwork/transxchange2gtfs
npm install --dev
npm test

If you would like to send a pull request please write your contribution in TypeScript and if possible, add a test.

License

This software is licensed under GNU GPLv3.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].