[Tagging] addr:street for routes
jmapb at gmx.com
Mon Aug 3 20:28:43 UTC 2020
On 8/3/2020 6:07 AM, Sarah Hoffmann wrote:
> There is some fuzzy matching, you can expect to work, for example
> abbreviations like street -> st or even New York -> NY. But going from
> ref=NY-214 to 'State Highway 214' is already a long stretch that requires
> special local knowledge.
Understood. And this is a little out of scope for the tagging list but I
suspect this kind of long-stretch fuzzy matching for numbered routes
will be necessary to return decent search results for a large portion of
the rural USA -- and I'd guess similar problems will be found in other
At least for the New York State routes, Google, Apple, Microsoft, and
HERE seem to get this right. I don't know of any OSM-centric maps that
do, and I'm not savvy enough to know which are using Nominatim and which
(Offhand, AI seems like overkill for this! The variations are pretty
> Note that 'on the ground' doesn't always mean that there needs to be a
> physical sign. I consider an envelope (of a letter) as much on the ground
> as a street name you get by asking the inhabitants what they call the
> street they live on. If you want to express these nuances you can always
> use the different variants of name (offical_name, local_name, old_name, ...).
> So, yes, in your situation I'd leave out the name tag, add the ref and
> a couple of *_name tags that contain the names used in the addresses or
> between locals.
The inhabitants call it all of the above. Usually they'll just say "214"
(pronounced "two-fourteen.") I'm not inclined to rifle through people's
mail, but I assure you that every variation *except* the bare "214" will
be written on envelopes and will be delivered. (Assuming the USPS
survives the current attempt at extermination.)
> Nominatim's algorithm currently is to match addr:street with any name or
> ref tag on a highway (including service, footway, path, etc.) It allows a
> little bit of fuzziness but ideally you use exactly the same spelling. If
> nothing is found, it simply uses the nearest street.
> There is another solution, if you really don't like the requirement of
> exactly matching names: associatedStreet relations. They do take precedence
> over the matching as explained above. Using those relations you can
> use a different addr:street name.
> Disclaimer: I have a deep dislike of associatedStreet relations and consequently
> they suffer from a bit of neglect in Nominatim. :)
Yes, I've been trying to avoid mentioning associatedStreet! I'm
comfortable creating and maintaining these relations as a last resort,
but heck they're annoying. We'd prefer a solution that would allow a
casual mapper to add or fix addresses along a route.
For now I've had a go with verbose explicit tagging using _name tags as
you've suggested (ignoring JOSM's "alternative name without name" warnings):
official_name=State Route 214
alt_name=Route 214;Highway 214;State Highway 214;New
York 214;New York State Route 214
I've used the USPS-rectified format for the `official_name`, which isn't
exactly right (`postal_name` might be a better tag) but seems close enough.
It's unclear to me how useful it is to cram in all those
semicolon-separated values under `alt_name`. Since this update,
Nominatim is now giving decent (one block away) results for "58 State
Route 214, Phoenicia NY" but nothing for "58 State Highway 214,
Phoenicia NY" so maybe I just have to pick a single `alt_name` and maybe
throw in a `local_name`? (Must confess, this sort of shoehorning starts
to feel a little odd.)
...Regardless, if this general approach is considered valid and
workable, then I'd like to propose the following answer to my original
* Q) How should `addr:street` be tagged for an address along an
unnamed way which is part of a numbered road-type route relation?
* A) Check the way for alternative name tags. The official postal
version of the street name may be tagged as `official_name`; if so
that's a good value for `addr:street`. If the way has other name tags --
such as `alt_name`, `local_name`, `old_name`, or a language-specific
name -- those values may be used. It's also possible to use the value of
the way's `ref` tag, which should match the name of the route relation.
Thanks all for your thoughtful replies, and let me know if this seems sane.
More information about the Tagging