Skip to content

Instantly share code, notes, and snippets.

@morganherlocker
Last active August 29, 2015 14:10
Show Gist options
  • Select an option

  • Save morganherlocker/80131404b2d977b5a86e to your computer and use it in GitHub Desktop.

Select an option

Save morganherlocker/80131404b2d977b5a86e to your computer and use it in GitHub Desktop.
osrm isochrone

drivetime polygons

##algorithm

  1. create a grid around a point; grid should be (2*(minutes*0.8)) miles wide (assuming max speed is 70mph)
  2. get the eta from the point to each gridpoint
  3. run marching squares over the grid at the desired drive time

##notes

  • etas can be generated fast (sub-ms I believe), especially if not route is returned
  • should this be a node module calling into osrm through node-osrm, added into osrm core, something else? (http wrapper is probably way to slow and will reduce our ability to make high res rings)
  • turf-isobands might be a guide for marching squares, but I would like to tune the results a bit better
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment