[Talk-us] US Route Tagging With Relations

Zeke Farwell ezekielf at gmail.com
Tue Dec 23 17:36:18 GMT 2008


Hi Everyone,

I've been thinking that we ought to have a standardized scheme for tagging
Interstates, US Highways, State Highways, and any other numbered routes in
the United States.  The information I've found on the Wiki regarding US
Route Tagging<http://wiki.openstreetmap.org/wiki/United_States_roads_tagging>suggests
that all information should be put into the ref tag.  For example,
Interstate 95 should be tagged as "ref: I-95", and if Interstate 95 joins
interstate 93 and they follow the same road for a while that segment should
be tagged as "ref: I-95;I-93".  Mapnik then renders the road with a little
box containing [I-95;I-93] which does not make for a pretty map.  To me it
seems cleaner to use the ref tag only for the route number (ref: 95).
However, that would mean we lose the information about what network the
route is part of.  Also, what do we do about the multiple route problem?

The answer is Relations!  They are awesome.  Mapnik doesn't render route
number badges from relations yet, but it will in the future.  I have been
tagging routes with relations in Vermont for a while now.  For example here
is the tagging scheme for the US Highway 7 relation:

type: route
route: road
network: US
ref: 7

Once I've made this relation, any Way that should is a part of Interstate 91
I simply make a member of the relation.  The tagging scheme for the actual
way might look like this:

US 7   (relation)
highway: primary
name: Main St
ref: 7

The ref tag is not even necessary, because the information is stored in the
relation, but I've included is because Mapnik doesn't yet render relation
reference numbers.  The best part is that when US Highway 7 and US highway 2
join for a while the tagging just looks like this:

US 7 (relation)
US 2 (relation)
highway: primary
name: Main St

This solves a number of the problems surrounding the tagging of numbered
routes and makes the database much cleaner.  It also allows for the future
possibility of route numbers being rendered with the proper shield symbol to
differentiate Interstate from US Highway form State Highway.  I propose that
we all start using relations to tag numbered highways in the United States,
and when Mapnik eventually gets around to rendering reference numbers from
relations, we can stop using the ref tag on ways themselves entirely.

Zeke Farwell
Burlington, VT, USA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk-us/attachments/20081223/303de590/attachment.html>


More information about the Talk-us mailing list