diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-08-27 18:05:59 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-08-27 18:05:59 +0200 |
| commit | 558f755f5746a4ee819de87579951b7533688e5d (patch) | |
| tree | ced2f96966a5aee90a7756e0c01f0b1295a2a55d /web/views.go | |
| parent | 751af663f38e174203c10438e5ef36277e93cd68 (diff) | |
Categorise OSM passes by highway and colour them on the ride detail map
Passes are extracted from OSM PBF nodes (mountain_pass=yes) and linked to
containing ways; highway road values map to road, track to track,
path/footway to path, plus hiking for rock/climbing. All passes are kept,
coloured distinctly (road/track/path/hiking/unknown) for road-bike validation
on ride 397. Single squashed migration adds category column, cheap to re-extract.
Diffstat (limited to 'web/views.go')
| -rw-r--r-- | web/views.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/web/views.go b/web/views.go index 5c8d452..9a79906 100644 --- a/web/views.go +++ b/web/views.go @@ -82,6 +82,7 @@ type RideMapPass struct { ElevationM int `json:"elevationM"` Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` + Category string `json:"category"` } type RideProfile struct { @@ -322,6 +323,7 @@ func buildRideMapPasses(passes []mountain_pass.MountainPass) []RideMapPass { ElevationM: mountainPass.Elevation, Latitude: mountainPass.Coord.Lat, Longitude: mountainPass.Coord.Lon, + Category: mountainPass.Category, }) } return mapPasses |
