mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 17:22:19 +00:00
Tighten the TransLink and Adelaide Metro docs, comments and release note
This commit is contained in:
1 parent
d7b38c8c62
commit
02f0063cca
6 files changed
+22
-30
No files matched your search
+1
-1
@@ -272,7 +272,7 @@ The optional Local ADS-B layer and the broadcast-FM receiver use radio you recei
|
||||
- **Houston TranStar cameras.** Keyless. The camera list is the public `traffic.houstontranstar.org/data/layers/cctvSnapshots_json.js` catalog (~1,000 cameras across Greater Houston); frames are stills at `www.houstontranstar.org/snapshots/cctv/<id>.jpg`, synthesized from a validated numeric id rather than taken from the payload, and only that host is registered. Cameras whose catalog id is `0` (a different, non-snapshot class) and cameras outside Greater Houston are dropped. TranStar's `dir` field is the side of the freeway the camera sits on, not the way it faces: TranStar's own map shows it as "Traffic closest to the camera is traveling …" (South → eastbound, North → westbound, West → southbound, East → northbound). That travel direction (90°, 270°, 180°, 0°) seeds the heading as a low-confidence prior with the low-confidence pose; `None` or an unknown value uses the shared id-hash fallback at low confidence. Headings are corrected with the in-app calibration gizmo. Off by default. TranStar's [Content Usage terms](https://traffic.houstontranstar.org/disclaimer.aspx) prohibit copying or distributing the site's information, and external framing or linking to specific images, without TxDOT's prior written permission; its FAQ grants permission-free use only for the RSS feeds. This project does not hold that permission for downstream installations, so the pack loads only when an operator who holds TxDOT's written permission sets `CCTV_HOUSTON_ENABLED=1`; with the flag unset, empty or any other value, the server makes no request to TranStar. Once enabled, it loads the 250 cameras nearest downtown, Uptown, the Medical Center, IAH and Galveston; `CCTV_HOUSTON_MAX_SOURCES` (8–400) changes the cap. Snapshots update about every 3 minutes, which is also the ambient still cadence. Frames are fetched from TranStar and relayed to the browser on demand, buffered only transiently per request, sent with `Cache-Control: no-store`, and not archived.
|
||||
- **Autostrada del Brennero (A22) webcams.** Keyless. The camera list is one request to the Open Data Hub tourism API (`tourism.api.opendatahub.com/v1/WebcamInfo?source=a22`), run by NOI Techpark in South Tyrol, which republishes Autobrennero's own list of 13 motorway webcams with coordinates and kilometre markers. Frames are the operator's stills on `www.autobrennero.it/WebCamImg/km<N>.jpg`, refreshed about once a minute, and only the exact image for each camera's kilometre is registered. The feed names no bearing, so headings use the id-hash fallback at low confidence. The road climbs from about 20 m in the Po valley to about 1,370 m at the Brenner Pass, so each camera's ground elevation comes from a per-kilometre table sampled from the Copernicus GLO-90 DEM (via Open-Meteo's elevation API); a camera not in the table uses a 200 m prior. The Open Data Hub tags every record CC0 (`ClosedData: false`, Autobrennero as licence holder), but that tag is the aggregator's metadata and Autobrennero publishes no terms of its own for the images, so they are credited to the operator as a courtesy and are not redistributed. Frames are fetched at request time and never stored. Disable with `CCTV_A22_ENABLED=0`.
|
||||
- **Camera frame content.** Public camera frames can contain people, vehicles and license plates, and the camera layer does nothing with them beyond putting them on the map. A successful upstream response is relayed as the provider served it: nothing in the camera pipeline blurs, redacts, enhances or restores it, and nothing there runs face, plate or object detection or otherwise recognises or classifies what is in the picture. (The ALPR layer described below maps where plate-reader cameras are, from locations contributors tagged in OpenStreetMap; it reads nothing from any camera frame.) When an upstream has no frame for a camera, what you see instead is a Google Street View still or the app's own placeholder card; the panel's source badge names which of them you are looking at, and a refresh that fails after a frame has arrived leaves the last good picture on screen rather than replacing it. The browser resamples each frame for display: onto a fixed 1920x1080 surface for the camera's projection plane in the scene, and onto a 192x108 canvas for the small ambient card. That scaling is the only change made to the picture, and the only pixels the camera layer reads back are a 64x36 downscale hashed to tell whether the picture has changed. Live streams are piped through; the still path reads the image into memory to pass it on — TxDOT wraps its JPEG in a JSON envelope, which is decoded there — and no frame is written to disk (the disk cache, `.gev-cache/`, holds feed JSON for other layers and never camera imagery). Outside that pipeline, the voice assistant is the one feature that sends imagery anywhere: when it answers a question about what is in view it may attach a downscaled screenshot of the rendered scene — including any camera plane on screen — to the request it sends to the voice model. Frames are fetched only from server-registered camera URLs — a client cannot hand the proxy a URL (see [SECURITY.md](SECURITY.md)). What the app does stays inside the line README draws: no named-person search, no face recognition, no tracking individuals.
|
||||
- **Transit (GTFS-Realtime).** The proxy requests only registered operator feeds, validates redirects, bounds responses, and uses conditional requests, short snapshot caching and failure backoff. All fifty-three registered feeds, covering fifty regions, are live-enabled; each can be disabled independently. The TransLink feeds (South East Queensland and Cairns) are keyless and published under CC BY 4.0; the passage they rest on is quoted in `terms` in `src/data/transitFeeds.js`. Vehicles use delayed playback between reports, with report age and waiting states shown separately. Session-local selected trails are available for every feed. MBTA additionally retains up to 15 minutes of recently observed positions in the running proxy, so available history can survive a browser reload; server restart clears it. History reads never fetch upstream, and other feeds have no proxy retention. Nothing is archived to disk or collected in the background. Operator text credits are included as a courtesy and do not imply endorsement. Heights are aligned to work with Google 3D tiles; subway markers are shown at street level because these feeds do not supply depth. The TTC feed is BusTime, the surface system: it carries buses and streetcars and no subway at all. About four in ten of its vehicles report no route at all (unassigned or deadheading), and those are shown with the feed default rather than a route-established mode. It sends no ETag or Last-Modified, so its conditional requests fall through to the ordinary snapshot cache. Three Golden Horseshoe neighbours run alongside it — MiWay, Hamilton HSR and Durham Region Transit — each bus-only and each polled only near its own region. Durham Region Transit publishes no bearing on any vehicle, so those sprites take their heading from observed movement like any other feed that omits it. Guelph, Kingston and Barrie extend the same pattern eastward and north. Hamilton, Guelph, Burlington, YRT and Rio’s SMTR publish route ids that are not the number on the vehicle, so those entries carry a route-name table taken from each operator’s own published GTFS; any id missing from a table renders unchanged rather than blank. A label is never invented: YRT runs a route `9101` that appears nowhere in its published routes, so it stays as the feed sends it. Burlington’s is the one that cannot be shortcut: `351` is route 1 while `3510` is route 10, so the table is a real join rather than a trimmed prefix. TransLink needs no table: its route keys carry a GTFS version suffix (`200-4`) and Cairns puts a `C` before its bus numbers (`C123-33`), so both are stripped by rule to the number on the vehicle. GO Transit / Metrolinx is deliberately absent: its REALTIME feed requires an API key issued by manual review, which the keyless admission rule excludes (its static schedule download is keyless, but carries no vehicle positions). Barrie and YRT/Viva each invite acceptance of their licence through a form, and each licence also states that using the data is itself acceptance; this deployment relies on that clause, which is recorded in both entries. Grand River Transit in Waterloo is absent for a different reason: it answers, but its feed header was months stale and it publishes no per-vehicle timestamps, so it would render vehicles that look live and are not. Ottawa’s OC Transpo falls to the same keyless admission rule as GO Transit — its realtime feed requires an API key. London Transit and Thunder Bay Transit publish vehicle positions over plain HTTP with no HTTPS endpoint available. Every other Ontario system — Brampton, Oakville, Niagara, Milton, Windsor, Greater Sudbury, UP Express and a dozen smaller operators — publishes static GTFS schedules only, with no realtime vehicle positions to register. Between the nine included and these exclusions, every Ontario realtime vehicle-position feed catalogued in the Mobility Database is accounted for.
|
||||
- **Transit (GTFS-Realtime).** The proxy requests only registered operator feeds, validates redirects, bounds responses, and uses conditional requests, short snapshot caching and failure backoff. All fifty-three registered feeds, covering fifty regions, are live-enabled; each can be disabled independently. Vehicles use delayed playback between reports, with report age and waiting states shown separately. Session-local selected trails are available for every feed. MBTA additionally retains up to 15 minutes of recently observed positions in the running proxy, so available history can survive a browser reload; server restart clears it. History reads never fetch upstream, and other feeds have no proxy retention. Nothing is archived to disk or collected in the background. Operator text credits are included as a courtesy and do not imply endorsement. Heights are aligned to work with Google 3D tiles; subway markers are shown at street level because these feeds do not supply depth. The TTC feed is BusTime, the surface system: it carries buses and streetcars and no subway at all. About four in ten of its vehicles report no route at all (unassigned or deadheading), and those are shown with the feed default rather than a route-established mode. It sends no ETag or Last-Modified, so its conditional requests fall through to the ordinary snapshot cache. Three Golden Horseshoe neighbours run alongside it — MiWay, Hamilton HSR and Durham Region Transit — each bus-only and each polled only near its own region. Durham Region Transit publishes no bearing on any vehicle, so those sprites take their heading from observed movement like any other feed that omits it. Guelph, Kingston and Barrie extend the same pattern eastward and north. Hamilton, Guelph, Burlington, YRT and Rio’s SMTR publish route ids that are not the number on the vehicle, so those entries carry a route-name table taken from each operator’s own published GTFS; any id missing from a table renders unchanged rather than blank. A label is never invented: YRT runs a route `9101` that appears nowhere in its published routes, so it stays as the feed sends it. Burlington’s is the one that cannot be shortcut: `351` is route 1 while `3510` is route 10, so the table is a real join rather than a trimmed prefix. TransLink needs no table: its route keys carry a GTFS version suffix (`200-4`) and Cairns puts a `C` before its bus numbers (`C123-33`), so both are stripped by rule to the number on the vehicle. GO Transit / Metrolinx is deliberately absent: its REALTIME feed requires an API key issued by manual review, which the keyless admission rule excludes (its static schedule download is keyless, but carries no vehicle positions). Barrie and YRT/Viva each invite acceptance of their licence through a form, and each licence also states that using the data is itself acceptance; this deployment relies on that clause, which is recorded in both entries. Grand River Transit in Waterloo is absent for a different reason: it answers, but its feed header was months stale and it publishes no per-vehicle timestamps, so it would render vehicles that look live and are not. Ottawa’s OC Transpo falls to the same keyless admission rule as GO Transit — its realtime feed requires an API key. London Transit and Thunder Bay Transit publish vehicle positions over plain HTTP with no HTTPS endpoint available. Every other Ontario system — Brampton, Oakville, Niagara, Milton, Windsor, Greater Sudbury, UP Express and a dozen smaller operators — publishes static GTFS schedules only, with no realtime vehicle positions to register. Between the nine included and these exclusions, every Ontario realtime vehicle-position feed catalogued in the Mobility Database is accounted for.
|
||||
- **Rail (GTFS-Realtime trains).** Each feed in `src/data/railFeeds.js` records its licence, its credit and the passage of its terms the decision rests on, and a feed is switched on only when those terms were read and cover this use, or, for those that publish no licence at all, on the basis its entry records. Such a basis is never a licence, and the credit does not present it as one: its label says there is no licence ("No licence published", "No licence stated") or names the publication the use rests on. Five enabled feeds publish no licence for their train positions. MARC is used on what its publication says (open publication with a no-endorsement disclaimer), and METRO light rail on the same basis as the Transit layer's Metro Transit feed. Tri-Rail and Charlotte's LYNX are used without a published licence by project owner decision of 2026-11-10. The fifth is Irish Rail, whose train positions publish no licence while its NTA timetable is CC BY 4.0. The registry lists 30 feeds, all switched on, and every one is keyless: its realtime feed and its static timetable are published for anyone to fetch, so no feed needs a key, an account or a registration, and the server holds no rail credential. No rail request carries a credential of the deployer's; one feed's published URL includes a fixed public value its publisher prints for everyone (Bordeaux's `apiKey`). `/api/rail/feeds` lists the offered feeds, `/api/rail/trains/<feedId>` returns one feed's train snapshot, `/api/rail/updates/<feedId>` its trip updates, and `/api/rail/paths/<feedId>` and `/api/rail/schedule/<feedId>` its path and schedule packs, when built. The proxy requests only registered feeds and reuses the Transit proxy's request policy (a short snapshot cache with single-flight refresh, serve-stale, admission limits, the failure cooldown ladder, redirects followed hop by hop only on the feed's own https origin, and an 8 MiB body cap unless a feed sets its own, at most 64 MiB). Many operators publish trains in the same feed as their buses, so each feed has a classifier: the proxy keeps only vehicles it recognises as trains, tags each with a category (`transit`, `local`, `regional`, `national` or `international`) and a mode (`rail`, `metro` or `tram`), and drops everything else server-side, counted in the snapshot as `dropped`; the browser never receives a bus. Every train shown is live, where its operator last reported it: 29 feeds publish live GPS positions (SJ Nord's through SIRI VM), and Irish Rail reports the station or timing point a train last passed. No train is placed or moved from a timetable; a feed whose live positions fail shows as unavailable, and its trains age out as any quiet train does. 22 feeds register trip updates, polled while one of their trains is selected and that feed's schedule pack is loaded. 28 feeds work out of the box. Packs are an opt-in extra for live trains: nothing is downloaded when the app starts, and `node scripts/build-rail-paths.mjs --feed <id>` (repeatable) or `--all` downloads a feed's static GTFS (29 of the 30 have one) and writes a path pack (the operator's track shapes) and a schedule pack (the stop times for a window of days) to `.cache/rail-paths/` (or to `RAIL_PATHS_DIR` when set, the directory the server then serves). With them, a live train is drawn on its operator's route line and its card names its stops, its next stop and, from the trip updates, their delays. Renfe long and medium distance and KTMB, whose vehicles name no route, are classified from their pack's routes, so `/api/rail/feeds` lists them only once that pack is built. Lines are the operator's own shapes as published: nothing is routed or redrawn from other map data, and no line is drawn where an operator publishes no shape. **Share-alike sources bind the deployer.** A pack built from a ShareAlike or ODbL source is a derived database of it, so a deployer who serves it publicly makes it subject to the same licence and must offer it under that licence with the attribution kept. That covers the Montpellier packs (ODbL). For the ODbL datasets of France's national access point, its special conditions also require that "Les bases de données ainsi repartagées doivent être publiées sur le Point d'accès national transport.data.gouv.fr, dans le format d'origine" ([Licence ODbL](https://doc.transport.data.gouv.fr/le-point-d-acces-national/cadre-juridique/conditions-dutilisation-des-donnees/licence-odbl), read 2026-11-10): a deployer who serves the Montpellier packs publicly takes on republishing that derived data there, as GTFS. The build downloads each static GTFS itself, over https and with no credential. A feed's `staticRouteTypes` lists the route types it keeps when its classifier accepts every route of a mode-specific feed. A frequency-based trip becomes one run per departure on its template's stops and run times. Packs are build output, not part of the repository, and cover a fixed window of days, so they are rebuilt before it ends, anLine truncated
|
||||
- **Radio country coverage (optional).** Set `RADIO_PRIORITY_COUNTRIES=IN,PL` in the local `.env` and restart to include stations beyond the global click charts. The operator may choose up to eight unique ISO alpha-2 country codes; no key is needed. Each country adds one bounded query (at most 200 rows) and reserves up to 40 unique, usable stations inside the existing 750-station catalog. Country seeds precede specialist-tag seeds and global popularity fill; unused slots return to the shared pool. This is a coverage preference, not an exhaustive national directory or a guarantee of stations in every city. Countries with no eligible HTTPS MP3/AAC geolocated stations remain empty. An unset list preserves global selection. Country requests share the directory cache and three-worker pool; failed country queries are reported in coverage without blocking a healthy global refresh. Failed/degraded refreshes back off for one minute, with at most three mirrors per query.
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
- Transit adds TransLink Cairns, a keyless Australian GTFS-Realtime feed
|
||||
under CC BY 4.0 with a text credit. TransLink vehicles now show trains,
|
||||
Gold Coast light rail and ferries by route id instead of all appearing as
|
||||
buses, and the existing Adelaide Metro feed identifies its trains, trams and
|
||||
the SeaLink ferry the same way. TransLink route labels drop the GTFS version
|
||||
suffix, and Cairns drops its `C` prefix, so a bus reads "Route 123" rather
|
||||
than "Route C123-33" (willrenzo39, #1169).
|
||||
- Transit adds TransLink Cairns, a keyless feed under CC BY 4.0. TransLink
|
||||
trains, Gold Coast light rail and ferries, and Adelaide Metro trains, trams
|
||||
and the SeaLink ferry, now show as their own modes instead of buses.
|
||||
TransLink route labels drop the GTFS version and Cairns's `C` prefix, so a
|
||||
bus reads "Route 123", not "Route C123-33" (willrenzo39, #1169).
|
||||
@@ -6438,14 +6438,13 @@ a record from the bundled proxy is classified by the hints alone. Route hints
|
||||
read from each operator's routes.txt cover Prague's trolleybus lines and Petřín
|
||||
funicular, and Bucharest, Cluj-Napoca and Turin's trams, trolleybuses and metro
|
||||
lines (and Turin's Sassi–Superga rack tramway, typed a funicular in its
|
||||
routes.txt). TransLink route ids resolve rail, Gold Coast light rail and
|
||||
ferries; Adelaide Metro route ids resolve trains, trams and the SeaLink ferry;
|
||||
other routes in those feeds keep the feed's bus default. Le Havre's funicular is a correction, not read from routes.txt: its
|
||||
routes.txt). Route-id hints also cover TransLink's rail, Gold Coast light rail
|
||||
and ferries, and Adelaide Metro's trains, trams and SeaLink ferry; their other
|
||||
routes stay buses by default. Le Havre's funicular is a correction, not read from routes.txt: its
|
||||
route hint and its correction both say funicular. Vilnius publishes no route ids in its positions, so
|
||||
its trolleybuses read as buses. TransLink route keys are shown
|
||||
without their GTFS version, and Cairns buses without their `C` prefix
|
||||
(`C123-33` reads as route 123). Retained history classifies its epochs the same
|
||||
way, so a trail joins the live vehicle.
|
||||
its trolleybuses read as buses. TransLink labels drop the GTFS version and
|
||||
Cairns's `C` prefix (`C123-33` reads as route 123). Retained history classifies
|
||||
its epochs the same way, so a trail joins the live vehicle.
|
||||
|
||||
Retained transit history uses the same outlier quarantine as live observations and
|
||||
preserves the active live bracket. Rejected reports do not publish route or mode
|
||||
|
||||
@@ -455,11 +455,10 @@ function burlingtonRouteLabel(routeId) {
|
||||
}
|
||||
|
||||
/**
|
||||
* TransLink (Queensland) route ids are `<route>-<version>`. Rail lines are two
|
||||
* two-letter station codes (`BRBN`, `SHCL`), ferries are `F<n>` plus the
|
||||
* Southern Moreton Bay Islands service `SMBI`, and the Gold Coast light rail
|
||||
* is `L1`. `SHUT` is the rail-replacement bus. Everything else is a bus, left
|
||||
* to the feed default so movement plausibility treats it as a guess.
|
||||
* TransLink route ids are `<route>-<version>`. Rail lines pair two station
|
||||
* codes (`BRBN`), ferries are `F<n>` and `SMBI`, light rail is `L1`. Buses,
|
||||
* the `SHUT` rail-replacement bus included, stay on the feed default, which
|
||||
* movement plausibility treats as a guess.
|
||||
* @param {string|null} routeId
|
||||
* @returns {string}
|
||||
*/
|
||||
@@ -473,10 +472,9 @@ function translinkRouteMode(routeId) {
|
||||
}
|
||||
|
||||
/**
|
||||
* TransLink route key to the route a rider would say: drop the `-<version>`
|
||||
* suffix (`200-4` → `200`, `L1-32` → `L1`), and drop the `C` Cairns puts in
|
||||
* front of its numbered buses (`C123-33` → `123`). South East Queensland has no
|
||||
* `C<digits>` routes; its rail codes such as `CLSH` are letters only.
|
||||
* The route a rider would say: `200-4` → `200`, `L1-32` → `L1`, and Cairns
|
||||
* `C123-33` → `123`. Only Cairns has `C<digits>` routes; rail codes such as
|
||||
* `CLSH` are letters only.
|
||||
* @param {string|null} routeId
|
||||
* @returns {string|null}
|
||||
*/
|
||||
|
||||
@@ -397,8 +397,7 @@ test('a feed with rider-facing route ids is left alone', () => {
|
||||
});
|
||||
|
||||
test('TransLink route keys lose their GTFS version; Cairns loses its C prefix', () => {
|
||||
// Both TransLink feeds key routes `<route>-<version>`, and Cairns prefixes
|
||||
// its numbered buses with C. Ids seen in the live feeds, 9 Nov 2026.
|
||||
// Ids seen in the live feeds, 9 Nov 2026.
|
||||
const seq = getTransitFeed('translink-seq');
|
||||
assert.equal(transitRouteLabel(seq, '200-4'), '200');
|
||||
assert.equal(transitRouteLabel(seq, 'L1-32'), 'L1', 'Gold Coast light rail');
|
||||
|
||||
@@ -48,8 +48,7 @@ test('TransLink route ids resolve rail, light rail and ferries; buses stay a def
|
||||
assert.equal(transitModeFor(seq, routeId), mode, routeId);
|
||||
assert.equal(transitModeResolved(seq, routeId), true, routeId);
|
||||
}
|
||||
// Buses, Brisbane Metro and the rail-replacement shuttle are buses by the
|
||||
// feed default, so movement plausibility does not treat them as known.
|
||||
// Buses stay on the feed default, so movement plausibility treats them as a guess.
|
||||
for (const routeId of ['600', '250-5169', 'M1-4949', 'SHUT-5213', null]) {
|
||||
assert.equal(transitModeFor(seq, routeId), 'bus', String(routeId));
|
||||
assert.equal(transitModeResolved(seq, routeId), false, String(routeId));
|
||||
@@ -60,7 +59,6 @@ test('TransLink route ids resolve rail, light rail and ferries; buses stay a def
|
||||
});
|
||||
|
||||
test('Adelaide Metro route ids resolve trains, trams and the SeaLink ferry', () => {
|
||||
// The feed entry is main's; this PR adds only its routeMode.
|
||||
const adelaide = getTransitFeed('adelaide-metro');
|
||||
const cases = [
|
||||
['BEL', 'rail'],
|
||||
@@ -121,6 +119,6 @@ test('DATA_SOURCES documents the TransLink feeds in the transit row style', () =
|
||||
assert.equal(
|
||||
adelaide.length,
|
||||
1,
|
||||
'exactly one Adelaide Metro transit row (main’s)',
|
||||
'one Adelaide Metro Transit row',
|
||||
);
|
||||
});
|
||||
Reference in new issue
Block a user