I maintain a web map style that shows walking and cycling route names. For the cycle routes, it shows the ref
. For some time I’ve massaged some of the names so that e.g. National Byway loops show as “NB (loop)” just like on the signage. However, as can be seen from the example above, some hiking route names are a bit convoluted - they’re more like descriptions than names.
For example, osm.org/relation/3971851 is the England Coast Path. Open up the list of members to see the names, which includes such delights as “King Charles III England Coast Path: Southend-on-Sea to Wallasea Island”. I’m pretty sure that it doesn’t say that on the signs there.
My preference would actually be something like this, with from
and to
tags, and a name that matches the signs, but clearly lots of people don’t do that. There are wiki pages that support osm.wiki/Names#Name_is_the_name_only and ones that support silly names. However, this diary entry isn’t about that - I was wondering if I could actually infer sensible names in the database or .mbtiles
file that I create maps from.
It turns out that relatively few relations in the area that I’m interested in have this problem - a few National Trails in England and Wales**, and a few regional routes split for other reasons. Note that something like GM Ringway Stage 8 looks like a valid name to me - although despite having walked a bit of it, I can’t remember if the signs actually have the stage number on them.
The result is this:
The shorter name means that there’s room for the name of the viewpoint now as well. The change is common to both raster and vector maps - and on vector maps the England and Wales National Trails get their own black and white shield too.
** Incidentally, I do wonder if the web designers at National Trails are closet Republicans - they’ve done literally the least possible amount of work to support the renaming of “England Coast Path” to “King Charles III England Coast Path”, not even moving it to its new alphabetical place in the list.
讨论
n76 于 2025年03月19日 22:16 的评论
I ran into similar issues with descriptions instead of names in the name field of relations in California about 4 years ago. I am not sure what the long term solution is to nudge mappers to make names on hiking routes match the signage on the ground.
Maybe if more renderers actually processed the information on hiking route relations and just displayed what was there the visual noise would get mappers to clean up their areas.
But I’d rather my maps be clean now, so I punted and preprocess away most of the stuff that annoys me before actually rendering my maps.
Lumikeiju 于 2025年03月20日 16:34 的评论
I also very much dislike the PTv2
name=*
conventions - I went withRoute <ref>: <destination>
for the public transport routes in WA.alan_gr 于 2025年03月30日 11:15 的评论
In fairness to mappers, it’s not always easy to derive a name from what is signed in the real world.
Many waymarked routes near me don’t have nice well-defined names like “King Charles II England Coast Path”. I have a photo of an information board labelled “GR249.4 Variante Villanueva del Rosario - El Chorro - Etapa 2: Antequera - Valle de Abdalajís”. The guideposts along that route route are labelled “GR249” (not GR249.4 like info board) and sometimes “Gran Senda de Málaga” (mentioned only in the small print in the info board). Disentangling a ref and a name that is not a description from all that is not trivial!
mapbear66 于 2025年03月30日 12:55 的评论
In my area we have a number of relations of the form: “Cape Wrath Trail (Letterewe - Carnmore - Larachantivore)”. But none with just Cape Wrath Trail. (Hmm can you have a super-relation?) And this being Scotland there are no signs, at all. It’s not a national trail, not adopted by any official body. Hence in places there are multiple routes for a variety of reasons.
As a renderer it gets tricky to work out how frequently to put in route names that work for everything. Allow mapnik to overlap text and you get a mess. Not allowing overlap, or layer ordering gets compromised, and long names seldom appear. Naming convention isn’t always consistent so pre-processing names for the root trail name needs to cope with the ever changing vagaries of mappers. Not that Ordnance Survey are consistent either, sometimes you get English / Gaelic names, and the other way round.
And then the other day I caught a mapper adding the trail name to multiple paths and tracks which already had a suitable relation. It wasn’t obvious enough in the editor (iD).
SomeoneElse 于 2025年03月30日 13:26 的评论
Interesting that you mention the Cape Wrath Trail. It is part of a “relation of relations” - osm.org/relation/9327615 . That’s
type=superroute
- there are about 4000 of those, and also sometype=super-relation
**. Just this morning I included it in the list to process, so that here it just shows as “Cape Wrath Trail”.From reading the wikipedia article it sounds like it has a similar status to “Wainwright’s Coast to Coast Walk” did in England before it was “adopted” by National Trails. There was some signage, but it was unofficial and often hit and miss. Generally speaking OSM doesn’t have “book only routes” (i.e. if they’re not signed on the ground they shouldn’t really be there) but there are exceptions that “everyone knows” (like the Coast to Coast Walk was). Whether it should be there or not is a decision for the local community. My maps will omit names for routes that are tagged as being unsigned, but I hadn’t previously considered
description=unmarked
, which is how this one is tagged.It’s not just Mapnik - if anything the problem seems to be worse in Maplibre (for reasons that I haven’t really been able to work out yet). For now on vector maps, I’ve just made the route name text smaller that other text, in addition the the name consolidation described in this diary entry.
That’s a perennial problem, probably because some general purpose renderers (like OSM Carto) don’t show hiking routes at all.
** it’s confusing - when doing relation checks on these I just look at the geometry. The lack of consistency makes it difficult for iD.
mapbear66 于 2025年04月 3日 09:18 的评论
Thanks for that. I had a quick look the other day but they don’t appear to come through my osm2pgsql imports. I need to investigate some more.
If only. In the Highlands I see many usually taken from some obscure only published in German guides. Or someone’s itinerary for a walk. They tend to be marked LWN, so I’ve long since given up putting them on my map.
In a similar vein. We also get an occasional spate of someone’s wildcamp spots appear as tourism=camp_site along the WHW (for example),
Thanks for that too. Interesting bunch of stuff.
SomeoneElse 于 2025年04月 3日 10:19 的评论
If it helps, the lua code that I use to suppress unsigned routes is currently at https://github.com/SomeoneElseOSM/SomeoneElse-style/blob/master/style.lua#L1100 (“Check for signage - remove unsigned networks”).