feat(rail): add a Rail layer with keyless live trains

Live trains from 30 keyless operator feeds: GPS positions from 29 and
Irish Rail's station reports, shown as the operators publish them. 28
work out of the box; Renfe long and medium distance and KTMB appear once
their pack is built, because their vehicles name no route.

Packs are opt-in (scripts/build-rail-paths.mjs): the operator's own
route lines, stop names, next stops and trip-update delays for live
trains. Nothing downloads when the app starts, no train is placed from a
timetable, and no request carries a deployer's key.
This commit is contained in:
Denis Groshev committed 2026-11-11 16:06:22 +01:00
1 parent 14db73f201
commit 830c080803
114 files changed
+26639 -26

No files matched your search

+18
View File
@@ -503,6 +503,10 @@ export const DATA_CREDITS = [
key: 'gtfs-rt',
html: 'Transit vehicles: operator GTFS-Realtime feeds (each operator is credited below when its vehicles are shown)',
},
{
key: 'rail-gtfs-rt',
html: 'Trains: operator realtime feeds (each operator is credited below when its trains are shown)',
},
{
key: 'radio-browser',
html:
@@ -759,6 +763,20 @@ export function transitFeedCredit(feed, snapshot = null) {
};
}
/**
* Per-feed rail credit, registered the first time that feed's trains render
* (see `src/data/railFeeds.js` for the licence of each).
* @param {{ id: string, attribution: string, license: string, licenseUrl: string }} feed
* @returns {{ key: string, html: string }}
*/
export function railFeedCredit(feed) {
const transit = transitFeedCredit(feed);
return {
key: `rail-${feed.id}`,
html: transit.html.replace(/^Transit \(/, 'Trains ('),
};
}
/** Registered when the Bhote Koshi event reconstruction activates. */
export const BHOTE_KOSHI_CREDIT = {
key: 'bhote-koshi-2026',