Skip to content

Instantly share code, notes, and snippets.

@planemad
Last active August 29, 2015 14:24
Show Gist options
  • Save planemad/5d8cd7dd885048341458 to your computer and use it in GitHub Desktop.
Save planemad/5d8cd7dd885048341458 to your computer and use it in GitHub Desktop.
Mapping roads

Mapping roads

A road is a thoroughfare, route, or way on land between two places that has been paved or otherwise improved to allow travel by some conveyance, including a horse, cart, bicycle, motor vehicle or foot - Wikipedia

Roads are one of the most useful features of a map, as they help us find the best travel path between any two points based on our preferences.

Find the shortest driving route Khanpur to Rajanpur. Assume your car cannot swim. untitled

Roads are traditionally represented as solid dark lines. This makes it easy to visually follow the path between two points. Thicker and darker lines indicate a road of higher importance that can carry traffic at a higher speed, just like the veins in our body. screenshot 2015-07-09 16 04 25

Roads?

Using color shades and transparency further helps distinguish between many types of roads

Heirarchy of roads

Highways

  • highway=motorway fast, restricted access road
  • highway=trunk most important in standard road network
  • highway=primary
  • highway=secondary

Main Roads

  • highway=tertiary
  • highway=unclassified least important in standard road network

Streets

  • highway=residential smaller road for access mostly to residential properties
  • highway=living_street
  • highway=service smaller road for access, often but not exclusively to non-residential properties

Tracks

  • highway=track
  • highway=path

Properties of roads

Open Source Routing Machine - OSRM

http://map.project-osrm.org

Creating profiles for routing in OSRM

Visualizing roads

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment