Public transport
The package bundles two coordinated nodes for schedule data in GTFS format: the GTFS node processes static timetables (ZIP with stops, routes, trips and stop times) for selected administrative areas, the GTFS-RT node reads real-time data (Protobuf with delays, vehicle positions and alerts) and filters it by the ids from the GTFS node. Both are designed for very large, Germany-wide feeds.
- Package
- @htag/node-red-contrib-hypertegrity-urbanmobility
- Version
- 0.3.1
- Nodes
- 2
- Licence
- EUPL-1.2
Included nodes
GTFS
Downloads static GTFS schedule data as a ZIP, filters it to administrative areas and emits agencies, stops, routes, trips and stop times through five outputs.
Open nodeGTFS-RT
Reads GTFS Realtime feeds in Protobuf format, filters them by learned ids and emits TripUpdates, VehiclePositions and Alerts through three outputs.
Open nodeInstallation
npm install @htag/node-red-contrib-hypertegrity-urbanmobility
Alternatively install the package in Node-RED through the palette manager: Menu → Manage palette → Install and search for the package name. The package requires Node-RED 4.0.5 or later and Node.js 20.18 or later.
Shared notes
- Dependencies: The package uses
axios,@turf/boolean-point-in-polygonand@turf/helpersfor the spatial filtering of stops, andprotobufjsto decode GTFS Realtime feeds. The GTFS node additionally calls the command line toolsunzip,awkandsortand therefore runs only on Linux or Unix systems where these are installed. - Working together: Wire the Stops, Routes and Trips outputs of the GTFS node to the input of the GTFS-RT node. The GTFS-RT node learns its filter lists from them and refuses to fetch as long as no filters exist.
- Credentials: The default sources gtfs.de and realtime.gtfs.de are freely accessible and need no API key. Observe the terms of use stated there (DELFI data, attribution). Other feeds may have their own terms.
- Resources: Germany-wide static feeds need several gigabytes in the temporary directory during processing and several minutes of runtime; caches and filter lists are stored under
node-red-gtfs-dataandnode-red-gtfs-realtimein the temporary directory of the operating system. - Data protection: Static schedule data contains no personal data. Real-time data contains vehicle identifiers, positions and possibly licence plates that indirectly point to driving staff; store them only as long as necessary and never publish licence plates.
- Units: Delays in seconds, trip durations in minutes, speeds in metres per second, coordinates in decimal degrees.