tecznotes

Michal Migurski's notebook, listening post, and soapbox. Subscribe to this blog. Check out the rest of my site as well.

Oct 11, 2011 11:14pm

high road, for better OSM cartography

Tomorrow morning, I’m flying to Wisconsin for NACIS 2011, where I gave the keynote two years ago. Between this and last month’s OpenStreetMap conference I’ve been pushing forward on a number of OSM-related cartography projects. High Road, an answer to the confusion of rendering highways in Mapnik, is probably worth writing about.

High Road is a framework for normalizing the rendering of highways from OSM data, a critical piece of every OSM-based road map we’ve ever designed at Stamen. Deciding exactly which kinds of roads appear at each zoom level can really be done just once, and ideally shouldn’t be part of a lengthy database query in your stylesheet. In Cascadenik and regular Mapnik’s XML-based layer definitions, long queries balloon the size of a style until it’s impossible to scan quickly. In Carto’s JSON-based layer definitions the multiline-formatting of a complex query is completely out of the question. Further, each system has its own preferred way of helping you handle road casings.

Here’s a rendering of the approach to Lincoln Tunnel in Manhattan, where you can see how the underground roads turn into a maze of ramps that rise up from below the streets to connect to the surface roads between 9th and 10th Avenues:

This is London near Canary Wharf, where there are no freeways but a complex collection of overpasses and tunnels:

High Road works using a few tags: “highway” provides basic information on the kind of road shown, “tunnel” and “bridge” provide some hints as to the correct layering, and finally “layer” (where used) lets OSM editors explicitly specify the physical arrangement of roads. At high zoom levels High Road attempts to draw a faithful picture of physical reality, and as you zoom out it progressively switches to a more semantic, route-based view that sorts streets by importance. Only three general classes of road—highway, major road, minor road—are used, following the advice of 41Latitude.com’s final post on Google’s legibility.

At low zoom levels, Oakland’s freeway network is layered on top of all smaller roads:

Finally, High Road uses the Postgres UNION feature to explicitly collect and sort road casings. This is easier to show than explain, so here’s that Lincoln Tunnel approach again with inner lines in white, casings shown in green (the local edge intended for use on bridges and overpasses), and outlines in yellow (the global edge meant for separation from the background):

Normal again:

If you render OSM data, High Road can help your streets look right.

Comments (4)

  1. Fantastic! Will this work with TileMill anytime soon? ;-)

    Posted by Blaine Cook on Wednesday, October 12 2011 3:23am PDT

  2. Nice!!

    Posted by Benjamin Golder on Wednesday, October 12 2011 4:29am PDT

  3. Blaine, if you use Tilemill with Postgres it'll work right now! High Road sets up Views which can be used as a datasources in Tilemill. If you use shapefiles instead, it should be possible to generate them using high road and is something I ought to add to http://metro.teczno.com.

    Posted by Michal Migurski on Wednesday, October 12 2011 11:14am PDT

  4. Mike, if you're in UW-Madison, please take time to poke one of the largest university for being so lazy about OSM. I mapped most of the campus back in 2009 (well before Google did it) and it doesn't seems like there is a lot of action after I graduated and left :) Other than that - great job as usual!

    Posted by Maxim Dubinin on Wednesday, October 12 2011 1:00pm PDT

Sorry, no new comments on old posts.

December 2014
Su M Tu W Th F Sa
 
   

Recent Entries

  1. bike ten: schwinn touring
  2. more open address machine
  3. open address machine
  4. making the right job for the tool
  5. the hard part
  6. end the age of gotham-everywhere
  7. on this day
  8. write code
  9. managers are awesome / managers are cool when they’re part of your team
  10. bike eight: french parts
  11. being a client
  12. bike seven: building a cargo bike
  13. blog all video timecodes: how buildings learn, part 3
  14. talk notes, urban airship speaker series
  15. john mcphee on structure
  16. blog all oft-played tracks V
  17. tiled vectors update, with math
  18. disposable development boxes: linux containers on virtualbox
  19. week 1,851: week one
  20. tilestache 0.7% better

Archives