Skip to content

Commit 2a5585c

Browse files
committed
Add Digitraffic road weather publisher
1 parent 09b2b3e commit 2a5585c

7 files changed

Lines changed: 781 additions & 0 deletions

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Finland Digitraffic Road Weather Live Smoke
2+
3+
Date: 2026-05-29
4+
5+
## Summary
6+
7+
Phase 1 Finland datasource is live on the OSH CSAPI server using Fintraffic Digitraffic road-weather station latest-data endpoints.
8+
9+
Resources created without `--clean`:
10+
11+
- Procedure: `urn:os4csapi:procedure:digitraffic-road-weather:v1`
12+
- Root deployment: `urn:os4csapi:deployment:digitraffic-road-weather-demo:v1`
13+
- Station group deployment: `urn:os4csapi:deployment:digitraffic-road-weather-stations:v1`
14+
- Six station systems and `roadWeatherObs` datastreams
15+
16+
Two station system creates returned the known SensorHub HTTP 500-after-create/SensorML-PUT warning path and were recovered by UID lookup. Live SensorML checks still confirmed `Publish Interval=300s` for verified systems.
17+
18+
## Live Publish Result
19+
20+
One publisher cycle posted six observations successfully:
21+
22+
| Station ID | System ID | Datastream ID | Latest phenomenon time | Air C | Road C |
23+
| --- | --- | --- | --- | --- | --- |
24+
| 1014 | 05u0 | 075g2 | 2026-05-29T20:57:24Z | 9.0 | 14.7 |
25+
| 1003 | 05ug | 07602 | 2026-05-29T20:57:54Z | 10.7 | 16.1 |
26+
| 2002 | 05v0 | 076g2 | 2026-05-29T20:56:54Z | 6.2 | 10.2 |
27+
| 3036 | 05vg | 07702 | 2026-05-29T20:57:54Z | 8.5 | 9.5 |
28+
| 4010 | 06002 | 077g2 | 2026-05-29T20:57:54Z | 8.5 | 12.6 |
29+
| 12091 | 060g2 | 07802 | 2026-05-29T20:56:54Z | 7.4 | 8.8 |
30+
31+
Publisher output summary: `Published: 6`, `Skipped: 0`, `Errors: 0`.
32+
33+
## Verification Commands
34+
35+
Validated:
36+
37+
- `py -m py_compile publishers/digitraffic_road_weather/bootstrap_digitraffic_road_weather.py publishers/digitraffic_road_weather/digitraffic_road_weather_publisher.py`
38+
- `py publishers/digitraffic_road_weather/digitraffic_road_weather_publisher.py --dry-run --once`
39+
- `py publishers/digitraffic_road_weather/bootstrap_digitraffic_road_weather.py --dry-run --force-sml`
40+
- `py publishers/digitraffic_road_weather/bootstrap_digitraffic_road_weather.py --force-sml`
41+
- `py publishers/digitraffic_road_weather/digitraffic_road_weather_publisher.py --once`
42+
43+
Explorer follow-up: `demo/src/pages/MapViewPage.vue` now classifies Digitraffic/Fintraffic road-weather observation datastreams as `FIN Road Wx`.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Finland Source Endpoint Probe
2+
3+
Date: 2026-05-29
4+
5+
## Digitraffic Road Weather
6+
7+
Station metadata endpoint:
8+
9+
`https://tie.digitraffic.fi/api/weather/v1/stations`
10+
11+
Result: live GeoJSON `FeatureCollection` with 525 station features. Station geometry is Point coordinates in lon/lat order. Station properties include `id`, `name`, `collectionStatus`, `dataUpdatedTime`, and `state`.
12+
13+
Latest all-station data endpoint:
14+
15+
`https://tie.digitraffic.fi/api/weather/v1/stations/data`
16+
17+
Result: live JSON object with top-level `dataUpdatedTime` and `stations[]`. Each station has `id`, `dataUpdatedTime`, and `sensorValues[]` containing sensor `id`, `stationId`, `name`, `shortName`, `measuredTime`, `unit`, and `value`.
18+
19+
Station-specific latest data endpoint:
20+
21+
`https://tie.digitraffic.fi/api/weather/v1/stations/{id}/data`
22+
23+
Result: live JSON object for one station with the same `sensorValues[]` structure.
24+
25+
Verified fresh sample times during probe: 2026-05-29T20:47Z to 2026-05-29T20:51Z.
26+
27+
Selected Phase 1 curated stations:
28+
29+
| ID | Source name | Region |
30+
| --- | --- | --- |
31+
| 1014 | vt25_Hanko | Uusimaa south coast |
32+
| 1003 | st110_Vihti_Myllylampi | Helsinki western approach |
33+
| 2002 | vt8_Pyharanta_Ihode | Southwest Finland |
34+
| 3036 | vt6_Lappeenranta_Karki | Southeast Finland |
35+
| 4010 | vt12_Hollola_Hameenkoski | Central southern Finland |
36+
| 12091 | kt92_Inari_Naatamo | Lapland / Inari |
37+
38+
Implementation choice: use station-specific latest endpoints for the runtime publisher to keep each fetch bounded and easy to diagnose. Preserve the full source `sensorValues[]` payload as compact JSON in the CSAPI observation result while also lifting common operational fields such as air temperature, road-surface temperature, wind speed, wind direction, precipitation, road condition, and warning code.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Digitraffic Road Weather Publisher
2+
3+
Publishes a curated first Finland datasource: Fintraffic Digitraffic road-weather station observations.
4+
5+
Source endpoints:
6+
7+
- Station metadata: `https://tie.digitraffic.fi/api/weather/v1/stations`
8+
- Latest all-station data: `https://tie.digitraffic.fi/api/weather/v1/stations/data`
9+
- Station-specific data: `https://tie.digitraffic.fi/api/weather/v1/stations/{id}/data`
10+
11+
Initial curated stations are listed in `stations.json` and cover southern, western, eastern, central, and northern Finland.
12+
13+
## Bootstrap
14+
15+
```powershell
16+
py publishers/digitraffic_road_weather/bootstrap_digitraffic_road_weather.py --dry-run
17+
py publishers/digitraffic_road_weather/bootstrap_digitraffic_road_weather.py --force-sml
18+
```
19+
20+
## Publish
21+
22+
```powershell
23+
py publishers/digitraffic_road_weather/digitraffic_road_weather_publisher.py --dry-run --once
24+
py publishers/digitraffic_road_weather/digitraffic_road_weather_publisher.py --once
25+
```
26+
27+
Default publisher interval is 300 seconds.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Digitraffic road weather publisher package."""

0 commit comments

Comments
 (0)