[OSM-talk] Highway tagging in general around the world

Richard Fairhurst richard at systemeD.net
Wed Aug 15 10:13:26 BST 2007


Jeffrey Martin wrote:

> I'm not sure what the Highway= tag does.

Then you probably shouldn't suggest a whole new tagging system until  
you _are_ sure.

Lemme give you an example from A.N. Other Map Site, run by some guys  
who don't like being evil, which might clarify.

In the UK, there is a road from London to Leicester and beyond. We  
call it a motorway, its number is the M1. It is subject to UK motorway  
regulations (70mph limit, no cycling, no tractors, etc.) and built to  
UK motorway build standards (all grade-separated junctions, minimum  
lane width, hard shoulder, etc.).

In OSM it's tagged as highway=motorway, ref=M1. "highway" means  
general type of road, "ref" means number. It'll be similar on A.N.  
Other Map Site. Their "highway" db column will contain "motorway" (or  
a numeric equivalent), their "ref" db column will contain "M1".

In France, there is a road from Paris to Le Mans and beyond. They call  
it an autoroute, its number is the A11. It is subject to French  
autoroute regulations and built to French autoroute build standards,  
both of which are broadly comparable but slightly different (110kph,  
less stringent junction requirements) to UK motorways.

In OSM it's tagged as highway=motorway, ref=A11. This, too, will be  
similar on A.N. Other Map Site. Their "highway" db column will contain  
"motorway", their "ref" db column will contain "A11". (Actually, it'll  
contain "A11;E50", because it has a Euroroute number as well.)

On A.N. Other Map Site, the UK motorway is rendered in blue, and the  
French one in dark orange. Those are local mapping conventions, and  
A.N.etc.'s renderer is smart enough to render countries differently.  
We're not, yet, but one day we will be.

For one final example, let's go to Australia. A.N. Other Map Site has  
maps there, too. Actually Australia is really good fun because the  
conventions differ from state to state.

In Victoria and South Australia, A.N.etc. shows primary highways as  
dark orange with an 'M4' number (highway=motorway, ref=M4). And so on  
for A roads (highway=trunk, ref=A39), B roads (highway=primary,  
ref=B300), C roads (highway=secondary, ref=C101). A.N.etc. is pretty  
smart and draws the right shields for each type of road, because it  
can get this from the tags/columns.

In NSW and even in some cities, the classification systems are  
different again, but the OSM principle is the same: road number in the  
ref tag; broad description of type of road in the highway tag; use  
additional tags ("route=Metroad", maybe?) if there's something you  
really can't express in ref and highway.

So you see the important things about highway tagging:

a) Tags should be interpreted within context: highway=motorway means  
"motorway-standard road following local conventions".  In the early  
days of OSM people used to go around tagging roads as "horse=yes":  
we're past that stage now. But if you feel it helpful, feel free to  
use the wiki to document the exact assumed meaning of each highway tag  
in each country.

b) Therefore we aim for broad equivalence, not exact equivalence:  
highway=motorway in the UK indicates a similar road, but not exactly  
the same, to highway=motorway in France or Australia.

c) Tags don't specify rendering (road colours, shields, etc.); the  
renderer uses a combination of tags in context to decide what  
rendering to use.

To pick up on the other thread, there is really no point in ref:au.  
ref in Australia _means_ ref:au. By all means tag it as  
is_in=Australia if you want to, but we'll eventually be able to infer  
that from country boundaries anyway, and Australia's boundary is  
pretty easy.

And before you say that the current highway tags are UK-centric, a)  
they're just words, b) OSM "highway=primary" equates to UK  
"non-primary A road" so maybe not. :)

cheers
Richard





More information about the talk mailing list