feat(tours): show the known SAC grades along a hike (MAP-03)

A hike in the planner, being edited or viewed as an import, now has an
"SAC grades" card. Switched on, it asks the router which OpenStreetMap
ways lie under the line (matched on foot, every grade of path open) and
the server reads their sac_scale through the Overpass mirrors, the same
trail-grades read the mountain bike grades use. The grades are drawn
along the route on the planner map in one ramp of a single hue, T1 to
T6, and listed by share and length; a row draws its class alone. Each
row names its source in a tooltip: the SAC hiking scale and the
sac_scale value OpenStreetMap wrote.

What is not known stays unknown and says why, never T1: a way without
a grade, a grade that names no single step (handed on as written), a
stretch with no way clearly under the tour's line, or a way that could
not be asked about. For imported tracks and stretches drawn by hand a
matched way only counts where it keeps within 25 m of the tour's own
line, so the original line is kept and nothing is guessed. The router's
own reading of the scale is not asked for, since it may be normalised.

The routing limit of a planned hike sits apart as a setting with its
own badge, and a known step above it is marked. Nothing about the tour,
its places or its days changes; switched off, the map is as it was.
No regional colour categories and no grade derived from slope, height
or trail markings.
This commit is contained in:
Maurice
2026-10-20 12:25:20 +02:00
parent ad2d653e9a
commit ea9e997338
63 changed files with 2327 additions and 108 deletions
+28
View File
@@ -519,6 +519,34 @@ const tours: TranslationStrings = {
"Graus tal com els han posat els mapadors d'OpenStreetMap. Un camí sense grau és desconegut, no fàcil. No diuen res de si un corriol et convé.",
'tours.bike.trail.loading': "S'estan llegint els graus dels corriols…",
'tours.bike.trail.failed': "Aquesta vegada no s'han pogut llegir els graus dels corriols.",
'tours.hike.sac.title': 'Graus SAC',
'tours.hike.sac.show': 'Mostra al llarg de la ruta',
'tours.hike.sac.t1': 'Senderisme',
'tours.hike.sac.t2': 'Senderisme de muntanya',
'tours.hike.sac.t3': 'Senderisme de muntanya exigent',
'tours.hike.sac.t4': 'Senderisme alpí',
'tours.hike.sac.t5': 'Senderisme alpí exigent',
'tours.hike.sac.t6': 'Senderisme alpí difícil',
'tours.hike.sac.untagged': 'Sense grau a OpenStreetMap',
'tours.hike.sac.unclear': 'Grau poc clar',
'tours.hike.sac.unmatched': 'Camí sense assignació clara',
'tours.hike.sac.unasked': 'No s’ha pogut consultar aquesta vegada',
'tours.hike.sac.unknown': 'Desconegut',
'tours.hike.sac.stepTip': 'Escala d’excursionisme SAC {step}, segons OpenStreetMap: sac_scale={tag}',
'tours.hike.sac.untaggedTip': 'OpenStreetMap no dona sac_scale a aquests camins. Desconegut no vol dir fàcil.',
'tours.hike.sac.unclearTip': 'OpenStreetMap hi indica {tags}, que no anomena cap grau concret.',
'tours.hike.sac.unmatchedTip':
'Aquí cap camí queda clarament sota la línia de la ruta, així que no es mostra cap grau.',
'tours.hike.sac.known': 'Conegut',
'tours.hike.sac.knownTip': 'La part de la ruta de la qual OpenStreetMap dona el grau SAC. La resta és desconeguda.',
'tours.hike.sac.highest': 'Màxim conegut',
'tours.hike.sac.routingLimit': 'Límit de càlcul',
'tours.hike.sac.routingLimitTip': 'El màxim que pot fer servir la cerca de ruta: un ajust, no el grau dels camins.',
'tours.hike.sac.aboveLimit': 'Per sobre del límit',
'tours.hike.sac.loading': 'S’estan llegint els graus SAC…',
'tours.hike.sac.offline': 'Els graus SAC necessiten connexió.',
'tours.hike.sac.failed': 'No s’han pogut llegir els graus SAC. La ruta no ha canviat.',
'tours.hike.sac.source': 'Segons OpenStreetMap. Hi pot haver buits; no és una valoració de seguretat.',
'tours.copy.action': 'Desa com a excursió nova',
'tours.copy.hint':
'Copia aquesta excursió com una excursió nova i independent, sense els seus dies. L’original es queda com està.',