mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-14 23:32:20 +00:00
feat(transit): add Rio de Janeiro buses and BRT (SMTR GTFS-RT, CC BY 4.0)
Register Rio's two keyless GTFS-Realtime VehiclePositions feeds from the city transport secretariat (SMTR): municipal buses (SPPO) and the Mobi-Rio BRT, the Transit layer's first Latin American region. Both feeds publish Position.speed in km/h instead of m/s. A new optional registry field, speedUnit: 'kmh', makes buildTransitSnapshot convert it once, so every speedMps consumer stays correct and other feeds are untouched. Document the source in DATA_SOURCES.md and update the region lists in README.md and docs/CURRENT-STATE.md. Refs #1480 Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
f13c60c477
commit
a4c7b20ca8
7 files changed
+147
-6
No files matched your search
@@ -385,7 +385,12 @@ function burlingtonRouteLabel(routeId) {
|
||||
* url: string, headers?: Record<string, string>,
|
||||
* license: string, licenseUrl: string, attribution: string,
|
||||
* defaultMode: string, routeMode?: (routeId: string|null) => string,
|
||||
* speedUnit?: 'kmh',
|
||||
* }>>}
|
||||
*
|
||||
* `speedUnit: 'kmh'` marks a feed that publishes `Position.speed` in km/h
|
||||
* instead of the m/s the spec requires; the proxy converts it before anything
|
||||
* downstream reads `speedMps`.
|
||||
*/
|
||||
export const TRANSIT_FEED_REGISTRY = Object.freeze([
|
||||
Object.freeze({
|
||||
@@ -729,6 +734,51 @@ export const TRANSIT_FEED_REGISTRY = Object.freeze([
|
||||
defaultMode: 'bus',
|
||||
routeLabel: burlingtonRouteLabel,
|
||||
}),
|
||||
Object.freeze({
|
||||
id: 'smtr-rio-onibus',
|
||||
name: 'Rio buses (SPPO)',
|
||||
operator: 'Secretaria Municipal de Transportes (SMTR), Rio de Janeiro',
|
||||
region: 'Rio de Janeiro, RJ',
|
||||
// Every vehicle in a 2026-10-29 snapshot, from Santa Cruz in the west to
|
||||
// the Zona Sul, sat within 31 km of this point.
|
||||
center: Object.freeze({ lat: -22.92, lon: -43.42 }),
|
||||
loadRadiusKm: 45,
|
||||
url: 'https://dados.mobilidade.rio/gtfs/realtime/onibus/vehicle-positions',
|
||||
license: 'CC BY 4.0',
|
||||
licenseUrl:
|
||||
'https://www.data.rio/documents/997bc16cc4344a5cb0e48ab06cbdfd1f',
|
||||
attribution: 'SMTR / Prefeitura da Cidade do Rio de Janeiro (CC BY 4.0)',
|
||||
defaultEnabled: true,
|
||||
terms: Object.freeze({
|
||||
quote:
|
||||
'This work is licensed under a Creative Commons Attribution 4.0 International License',
|
||||
note: 'The data.rio catalog page labels the feed [beta] and states a gateway limit of 5 requests a second and 60 a minute behind a 10-second cache, which the 15-second proxy TTL stays inside. It is the named replacement for the JSON GPS endpoints SMTR deprecated on 2026-10-07 and says it will switch off by 2026-11-30. SMTR relays the concessionaires’ ITS data and repairs trips with its own matching; the page places accuracy with the suppliers. Speeds arrive in km/h, not m/s (a 2026-10-29 snapshot peaked at 89), hence `speedUnit`. Route ids are internal keys: `O0313AAA0A` carried service 313 in the same day’s JSON feed. They are shown raw until a published table is joined.',
|
||||
}),
|
||||
defaultMode: 'bus',
|
||||
speedUnit: 'kmh',
|
||||
}),
|
||||
Object.freeze({
|
||||
id: 'smtr-rio-brt',
|
||||
name: 'Mobi-Rio BRT',
|
||||
operator:
|
||||
'Secretaria Municipal de Transportes (SMTR), Rio de Janeiro, for the Mobi-Rio BRT fleet',
|
||||
region: 'Rio de Janeiro, RJ',
|
||||
center: Object.freeze({ lat: -22.92, lon: -43.42 }),
|
||||
loadRadiusKm: 45,
|
||||
url: 'https://dados.mobilidade.rio/gtfs/realtime/brt/vehicle-positions',
|
||||
license: 'CC BY 4.0',
|
||||
licenseUrl:
|
||||
'https://www.data.rio/documents/8bb196cc02174d25b77437bb2f6443d4',
|
||||
attribution: 'SMTR / Prefeitura da Cidade do Rio de Janeiro (CC BY 4.0)',
|
||||
defaultEnabled: true,
|
||||
terms: Object.freeze({
|
||||
quote:
|
||||
'This work is licensed under a Creative Commons Attribution 4.0 International License',
|
||||
note: 'Same catalog terms, [beta] label and gateway limits as the bus feed. The fleet is operated by Mobi-Rio and tracked by SONDA, whose data SMTR relays. Speeds are km/h here too (peak 62 in the same snapshot). Route ids are opaque (`20000461130`) and are shown raw.',
|
||||
}),
|
||||
defaultMode: 'bus',
|
||||
speedUnit: 'kmh',
|
||||
}),
|
||||
]);
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user