Want to take your software engineering career to the next level? Join the mailing list for career tips & advice Click here

HighRoad

The last OpenStreetMap road query you will ever need.

Subscribe to updates I use HighRoad


Statistics on HighRoad

Number of watchers on Github 205
Number of open issues 9
Average time to close an issue about 5 hours
Main language CartoCSS
Average time to merge a PR 3 days
Open pull requests 2+
Closed pull requests 1+
Last commit almost 5 years ago
Repo Created about 9 years ago
Repo Last Updated over 2 years ago
Size 28.6 MB
Organization / Authormigurski
Contributors3
Page Updated
Do you use HighRoad? Leave a review!
View open issues (9)
View HighRoad activity
View on github
Book a Mock Interview With Me (Silicon Valley Engineering Leader, 100s of interviews conducted)
Software engineers: It's time to get promoted. Starting NOW! Subscribe to my mailing list and I will equip you with tools, tips and actionable advice to grow in your career.
Evaluating HighRoad for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

High Road

This may be the last OpenStreetMap road query you will ever need.

Between Mapnik, Cascadenik, and Carto, youve got a few options for rendering OSM data to tiles. High Road makes it easier to draw the road bits by hiding complicated PostGIS queries behind views, so that you can declutter your layer names while ensuring that youre using the right selection of roads for each zoom level.

Theres a sample Cascadenik style and layer file, but the real action is in high_road_views-setup.pgsql, where youll find a comprehensive set of Postgres views against the usual planet_osm_line table produced by Osm2pgsql.

To use High Road, run the source of high_road_views-setup.pgsql against your existing OSM rendering database and check out the sample files to understand what each query is doing.

High Road is made by Michal Migurski, Nathaniel Kelso and Geraldine Sarmiento of Stamen Design.

Setup

High Road can be applied to an existing OpenStreetMap rendering database created with osm2pgsql (http://wiki.openstreetmap.org/wiki/Osm2pgsql). Using the command-line psql utility, you can add High Road views like this:

psql -U username -f high_road_views-setup.pgsql databasename

The views here assume that you've created your database using the default settings of osm2pgsql, including the prefix of planet_osm. If you've chosen a different prefix, you should find every instance of planet_osm in the script below and replace is with your chosen prefix. The typical username for OSM databases is osm and the typical databasename is planet_osm.

More details in the high_road_views-setup.pgsql file comments.

Removal, upgrading

High Road can be removed from an existing OpenStreetMap rendering database.

NOTE: To upgrade your OSM planet, High Road will need to be removed before OSM import, then setup again after OSM import.

Using the command-line psql utility, you can remove High Road views like this:

 psql -U username -f high_road_views-remove.pgsql databasename

The views here assume that you've created your database using the default settings of osm2pgsql, including the prefix of planet_osm. If you've chosen a different prefix, you should find every instance of planet_osm in the script below and replace is with your chosen prefix.

This is the same as if you logged into Postgres:

psql -U username -d databasename

And dropped the views manually:

DROP VIEW planet_osm_line_z15plus CASCADE;
DROP VIEW planet_osm_line_z14 CASCADE;
DROP VIEW planet_osm_line_z13 CASCADE;
DROP VIEW planet_osm_line_z12 CASCADE;
DROP VIEW planet_osm_line_z11 CASCADE;
DROP VIEW planet_osm_line_z10 CASCADE;

Details

Taking a cue from Justin OBiernes dearly-departed 41Latitude blog, High Road ensures that each zoom level contains exactly three distinct levels of road: highways, major roads, and minor roads, a simplification of OpenStreetMaps conventional six-level hierarchy.

At distant zoom levels, local and residential streets are omitted. Bold, simple highways dominate the map, and the visual layering is categorical to clearly separate each road type.

Oakland, z11

Deeper in to the map, local streets and highway ramps start to appear. You begin to see block-scale details:

Oakland, z13

At the closest zoom levels, physical layering takes over and you begin to see over- and underpasses as they exist in the built world:

Oakland, z15

Oakland, for real

Elsewhere

A maze of ramps marks the east approach to New Yorks Lincoln Tunnel:

New York, z16

A cloverleaf interchange on Moscows MKAD:

Moscow, z14

Londons dense network of trunk roads, centered on the Isle of Dogs:

London, z12

HighRoad open issues Ask a question     (View All Issues)
  • almost 7 years explicit_layer regex
  • over 7 years Support custom prefixes
  • about 8 years Promote federal and state routes for smaller roads to bigger roads
  • over 8 years Ferries their own class
  • over 8 years Add two more highway types for detailed city street zooms
  • over 8 years Issue when using hstore
  • about 9 years Add adm0_type flag for promoting, demoting motorways
HighRoad open pull requests (View All Pulls)
  • Carto variant and sample project
  • narrow_guage -> narrow_gauge
HighRoad list of languages used
Other projects in CartoCSS
Powered by Autocode - Instant Webhooks, Scripts and APIs
Autocode logo wordmark