[Talk-us] US Route Tagging With Relations

Alan Brown adbrown1967 at yahoo.com
Tue Dec 23 18:15:02 GMT 2008


I like the idea.  In GDF - a (supposedly) standard exchange format for geographic data,
they have the concept of "composite attributes".  I think of a relation used in this way is really better described as a composite attribute that can be applied to many elements.

It's best to specify highway routes in a parsed format; in other word, a highway route relationship might have the following tags.

network ("I", "US", "State", etc).
route number ("80")
modifier("ALT","BR","BL","BUS","BYP","CONN","EXT","LINK","LOOP","SCENIC","SPUR",
"TOLL","TPKE","TRUCK")
directional("WB", "EB", "NB", "SB")

Vanity Name("Hollywood Expy")

This approach results in data that's more normalized (i.e., always use "US" instead of "United States", "US Route", "Federal Hwy", etc.).  Software could easily interpret it in sophisticated ways (i.e., stick "80" in a highway shield with "alt" above it, or print instructions "Take Alternate Interstate 80 Eastbound").  You can easily test if there's gaps where a route number has not been applied to a single edge (known as "name rice") .  If you use the network to specify highway shields, you can get sophisticated and start showing different shields for each state.

It's not without potential difficulties (separate relations for eastbound and westbound lanes?   Should Vanity names be included, as they usually don't extend the length of the freeway?  If someone changes a tag on a relationship, they have to be sure it's appropriate for every element that's part of the relationship.)  But I think this approach helps more than hurt.

-Alan



________________________________
From: Zeke Farwell <ezekielf at gmail.com>
To: talk-us at openstreetmap.org
Sent: Tuesday, December 23, 2008 9:36:18 AM
Subject: [Talk-us] US Route Tagging With Relations

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 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/bfe180f6/attachment.html>


More information about the Talk-us mailing list