Personal
SAC routes
GPX export for the Swiss Alpine Club's route portal
- Year
- 2026
SAC routes is a Chrome extension for the Swiss Alpine Club's route portal. On a route page it adds an Export GPX button. The file it writes keeps the grade, the timings and the notes for each segment, with elevation from swisstopo. Before you export, a preview draws the line over shaded relief, and a map shows how steep the ground is.

Reading the page
The SAC publishes the most current route descriptions in Switzerland. It deliberately offers no GPX export. Its reasoning is that lines change, and following one too literally is dangerous. So people redraw the routes by hand in another planner, which loses accuracy rather than adding safety.
The portal already has the exact line. To draw its own map, it fetches each route as data from its own server, in Swiss survey coordinates. So there's no need to trace a picture of the map. The extension reads what the page has already loaded.
Most routes are for members only (7 of the 11 I sampled). For those, the data only arrives when you're signed in. An extension on the page uses your own session, so it never handles a password and needs no server.1
Converting the coordinates to GPS uses swisstopo's published approximation, so there's no library to ship. As a check, at Curaglia swisstopo's height service gives 1331.3 m where SAC says 1332. Claude Code wrote the extension from my spec. I reviewed the code and tested it on the routes I sampled.
Turning segments round
SAC stores each segment in whatever direction someone happened to draw it. The route from Curaglia up to the Medelserhütte is stored hut first. So a naive export descends 1197 m and climbs 3, a file that would navigate you off the mountain instead of up it. The extension chains the segments outward from the route's start and turns each one round where it needs to. The same route now climbs 1196 m, against SAC's published 1200.
The route data is flat, with no heights at all. So the extension sends the line to swisstopo's elevation service, 900 points at a time. If the nearest height swisstopo returns is more than 20 m from a point, that point gets no height rather than a plausible but wrong one. Rises of under 2 m are left out of the ascent, so noise in the terrain model doesn't inflate the total.
The slope map
The map is there for context. It carries swisstopo's slope layer, which colours ground steeper than 30°, the threshold the SLF uses for avalanche terrain. On a ski tour above Les Lattes, the steep ground along the route mostly faces south-east. That matches the exposure SAC publishes for it. The map describes the ground. Judging the avalanche risk is still up to you.

The popup
The popup is set in monospace type, which makes it read as a technical tool. Chrome caps a popup at about 600 px tall, so everything fits in one column under that. Behind the line is shaded relief. At this size the national map's place names would drown out a 3 px line, and relief shows the terrain without any type.
Small things
The map zooms about one level for every 400 px you scroll, so a flick on a trackpad doesn't send it flying.
There's one export for every watch. Neither Garmin nor Suunto publishes a point limit for GPX, and Suunto's app drops waypoints that don't sit on the track. So the file keeps at most 2,000 points, and every waypoint is snapped onto the line.
The button appears on all four language versions of the portal. Each version translates the part of the address the extension looks for, so it reads all four from the portal's own language links.
Using it
SAC routes is a personal tool. It runs in my own browser, under my own SAC membership. I haven't published it, because the route data belongs to the SAC, and they chose not to offer it as a file.2