Ohio/Route relations

From OpenStreetMap Wiki
Jump to: navigation, search

Road and bicycle routes in the U.S. are complex enough that it often isn't enough to put a ref=* key on each way along the route. For instance, a map doesn't know to render ref=SR 123 with an Ohio-shaped shield, because several other states also use the "SR" prefix. The solution isn't to change "SR" to "OH": for one thing, "SR" is the correct abbreviation for Ohio state routes. (Just look at any "minutes to" variable message sign.) Also, other state abbreviations like "CA" conflict with route networks in other countries!

The preferred way to represent routes is through route relations. These relations allow you to provide detailed information about the route as a whole, instead of endlessly duplicating information on ways along the route. In particular, the network=* tag on route relations has a specific format that allows map renderers to choose an appropriate shield, such as the Ohio-shaped shield on state routes. Additionally, a way can be a member of multiple route relations, just as a road can carry multiple routes in real life.

See the difference route relations can make: the Shield Renderer knows how to label Ohio state routes, as well as a number of different county and township route networks, with shields that match signage along the road. It also does a great job with bannered and multiplexed routes. None of this would be possible without relations. We hope to someday integrate the Shield Renderer with the Standard map at osm.org, and the better our route relation coverage, the more likely we'll have proper shields on the main map.

How to create a route relation

Add each way along the route to a relation tagged with type=route + route=road + network=* + ref=*. For example, the relation for State Route 123 would have network=US:OH and ref=123. (Bicycle routes use the cycle_network=* key; for historical reasons, network=* indicates the relative importance of the route.) If the entire route has the same name, the name=* key may also be specified on the relation.

When adding divided highways to relations, the ways on each side of the highway are added to the relation with a different role. (In most editors, open the list of relations that a way belongs to; there is a small textbox beside each relation for entering the role.) Roles correspond to the signposted direction of each side of the highway (i.e., north). If you don't know the direction, use forward whenever the route goes in the same direction as the way, or backward otherwise.

Notes for specific editors:

  • iD: To add a way to a road route, open the "All relations" section, click the "+" button, click "New relation...", and choose "Road Route" from the "Route Features" category. The Number field corresponds to ref=* and the Network field corresponds to network=*.
  • Potlatch 2: When editing a highway route relation, switch to the Advanced tab to manually add the necessary tags; Potlatch doesn't have presets for highway routes.

Lists of relations

The Ohio WikiProject maintains registries of route relations to avoid duplication and track our progress: