central/tests/fixtures/tomtom_incidents_sample.json

1 line
1.6 KiB
JSON
Raw Normal View History

feat(tomtom_incidents): TomTom real-time traffic incidents adapter (v0.9.5) Fourth CENTRAL_TRAFFIC event adapter. Complements wzdx (federal work zones) and state_511_atis (state-DOT reports) with TomTom commercial vehicle-telematics coverage. Polls the Orbis incidentDetails endpoint per metro bbox, emits one event per incident to central.traffic.incident.<state>. Ships disabled. central-supervisor + central-gui restart only -- adapter row on the EXISTING CENTRAL_TRAFFIC stream, so NO archive restart and no new stream/dependency. Reuses the existing "tomtom" api key. - Bbox limit refutation: incidentDetails rejects bbox > 10,000 km^2, so coverage is per-metro bboxes (Treasure Valley / Boise, 8,601 km^2), NOT statewide. One bbox @ 1800s = 1,440 calls/mo = 58% of the 2,500/mo free-tier cap. Expansion rows must respect N*(43200/cadence_min) <= 2500. - category="incident.tomtom_incidents" -> GUI event_type "incident" (shared with state_511_atis; cross-source overlap is by design = additive coverage, distinct dedup ids + categories, no Central-side cross-source dedup). - Severity from magnitudeOfDelay (0->1,1->1,2->2,3->3,4->4; 4=closure). Never None. - geo.geometry carries TomTom's Point/LineString directly (already lon/lat GeoJSON; the v0.9.3 framework renders the affected road as a polyline). No decode needed. - Dedup id <state_code>:tomtom:<tomtom_id> (upstream id stable across polls, verified 154/154 over 60s). Inherits the v0.9.1 dedup mixin. - aiohttp params= URL-encodes the fields{} GraphQL braces (no curl-glob issue); key redacted from logs; poll skips cleanly without a key. Full suite: 809 passed, 1 skipped (central and unprivileged zvx, 3x each). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 00:25:27 +00:00
{"incidents":[{"type":"Feature","properties":{"id":"TTI-5df75143-312c-45ab-86c9-2b8e4e49d562-TTR14671884444019001","iconCategory":9,"magnitudeOfDelay":0,"startTime":"2026-04-03T03:27:30Z","endTime":null,"from":"Early Road","to":"Slade Road","length":234.054,"delay":null,"roadNumbers":[],"timeValidity":"present","events":[{"code":701,"description":"Roadworks","iconCategory":9}]},"geometry":{"type":"LineString","coordinates":[[-116.7368214523,43.794556286],[-116.7363762056,43.7939957253],[-116.7360181307,43.7935411016],[-116.7357297933,43.793107893],[-116.7354816889,43.7926894443]]}},{"type":"Feature","properties":{"id":"TTI-5df75143-312c-45ab-86c9-2b8e4e49d562-TTR14712278436123000","iconCategory":8,"magnitudeOfDelay":4,"startTime":"2026-05-16T01:22:00Z","endTime":null,"from":"Wagner Road","to":"Farmway Road / West Ustick Road","length":1483.2713788089,"delay":null,"roadNumbers":[],"timeValidity":"present","events":[{"code":401,"description":"Closed","iconCategory":8}]},"geometry":{"type":"LineString","coordinates":[[-116.7331709659,43.6332509025],[-116.7326506173,43.6332536325],[-116.73007972,43.6332683743],[-116.7281579172,43.6332831161],[-116.7265311574,43.6332965232],[-116.726281712,43.6332991925],[-116.724549005,43.633311265],[-116.7240957117,43.633311265],[-116.7231542563,43.6333139343],[-116.7217729186,43.633331406],[-116.7217608487,43.633331406],[-116.7206691896,43.6333434785],[-116.719480971,43.6333448132],[-116.7194689011,43.6333448132],[-116.7188157832,43.6333461478],[-116.7181224322,43.6333514864],[-116.7181103622,43.6333514864],[-116.7168953216,43.6333595549],[-116.7153798735,43.6333689581],[-116.7147415077,43.6333729621]]}}]}