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
+30
View File
@@ -521,6 +521,36 @@ const tours: TranslationStrings = {
"Gradi come li hanno assegnati i mappatori di OpenStreetMap. Un percorso senza grado è sconosciuto, non facile. Non dicono nulla sull'adattezza del sentiero a te.",
'tours.bike.trail.loading': 'Lettura delle difficoltà dei sentieri…',
'tours.bike.trail.failed': 'Questa volta non è stato possibile leggere le difficoltà dei sentieri.',
'tours.hike.sac.title': 'Gradi SAC',
'tours.hike.sac.show': 'Mostra lungo il percorso',
'tours.hike.sac.t1': 'Escursionismo',
'tours.hike.sac.t2': 'Escursionismo di montagna',
'tours.hike.sac.t3': 'Escursionismo di montagna impegnativo',
'tours.hike.sac.t4': 'Escursionismo alpino',
'tours.hike.sac.t5': 'Escursionismo alpino impegnativo',
'tours.hike.sac.t6': 'Escursionismo alpino difficile',
'tours.hike.sac.untagged': 'Nessun grado in OpenStreetMap',
'tours.hike.sac.unclear': 'Grado non chiaro',
'tours.hike.sac.unmatched': 'Sentiero non abbinato con certezza',
'tours.hike.sac.unasked': 'Non interrogabile questa volta',
'tours.hike.sac.unknown': 'Sconosciuto',
'tours.hike.sac.stepTip': 'Scala escursionistica SAC {step}, da OpenStreetMap: sac_scale={tag}',
'tours.hike.sac.untaggedTip':
'OpenStreetMap non assegna sac_scale a questi sentieri. Sconosciuto non significa facile.',
'tours.hike.sac.unclearTip': 'Qui OpenStreetMap riporta {tags}, che non indica un singolo grado.',
'tours.hike.sac.unmatchedTip':
'Qui nessun sentiero sta chiaramente sotto la linea del percorso, quindi non viene mostrato alcun grado.',
'tours.hike.sac.known': 'Noto',
'tours.hike.sac.knownTip': 'La parte del percorso di cui OpenStreetMap indica il grado SAC. Il resto è sconosciuto.',
'tours.hike.sac.highest': 'Massimo noto',
'tours.hike.sac.routingLimit': 'Limite di calcolo',
'tours.hike.sac.routingLimitTip':
'Il massimo che la ricerca del percorso può usare: un’impostazione, non il grado dei sentieri.',
'tours.hike.sac.aboveLimit': 'Oltre il limite',
'tours.hike.sac.loading': 'Lettura dei gradi SAC…',
'tours.hike.sac.offline': 'I gradi SAC richiedono una connessione.',
'tours.hike.sac.failed': 'Non è stato possibile leggere i gradi SAC. Il percorso non è cambiato.',
'tours.hike.sac.source': 'Da OpenStreetMap. Possibili lacune; non è una valutazione di sicurezza.',
'tours.copy.action': 'Salva come nuovo tour',
'tours.copy.hint': 'Copia questo tour come nuovo tour indipendente, senza i suoi giorni. L’originale resta com’è.',
'tours.copy.name': '{name} (copia)',