Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is anyone using open source tools and/or data to generate drive time polygons that radiate out from a given location? For example, I have used ESRI products like Network Analyst and Business Analyst to generate polygon boundaries that represent the maximum distance one can travel along a road network from a given point within a user defined period of time (say 5, 10, and/or 15 minutes). Are there any similar open source or web-based alternatives?

I saw this post, but it really doesn't give alternative options: Can you make a travel region polygon with with Google Maps API?

I was particularly curious to know if anyone is (or can) use OpenStreetMap to do drive time analysis?

Also, is there any implementation of the pgRouting utilities that could be used to generate polygons? http://pgrouting.postlbs.org/

share

locked by PolyGeo Mar 4 at 0:41

This question's answers are a collaborative effort: if you see something that can be improved, just edit the answer to improve it! No additional answers can be added here

    
Interested to see the answer to this one. As far as I am concerned, ESRI lead over Open-Source server products, mainly because it exposes Geoprocessing in an easy to serve/consume model. – Simon Oct 27 '10 at 10:20
    
Any update on this question? I am really interested in messing around with an open source DT poly creator in map scripting. – Furlong Dec 20 '10 at 18:20
    
I cannot definitely give an answer yet as I have had to put my work on this project on pause. Since I am not a "GRASS" guy, I am probably not going to go that route, although it seems like it is a very viable solution. Right now, however, I am leaning toward trying to use the pgRouting, which supposedly has Alpha Shapes functions built into it. – RyanDalton Jan 5 '11 at 20:54

11 Answers 11

up vote 42 down vote accepted

GRASS v.net.iso will give you a result like this:

enter image description here

You might not want to run a convex hull algorithm on this output. Imagine the blue roads: A convex hull around them would contain a lot of parts that are not reachable in the time represented by "blue".

Instead, you might want to look into alpha-shapes (related question: What are Definition, Algorithms and Practical Solutions for Concave Hull?)

alpha shape sketch

You can create drive time isochrones using pgRouting and QGIS (as described here). I didn't use OSM in this case, but of course you could build your routable network based on OSM (see osm2pgrouting tool).

enter image description here

(full resolution)

For a pure PostGIS solution, you can use pgRouting alpha shape function. Here is a comparison of alpha shapes as implemented in pgRouting and the approach I presented in the previous update:

enter image description here

Colored areas represent the results of alpha shape function, black lines are the results of the interpolation approach described earlier. The catchment areas are less detailed using pgRouting's alpha shapes. Also, there seems to be no way to vary the value of alpha to create more detailed representations.

share
    
+1 for the alpha-shapes – om_henners Oct 27 '10 at 23:05
1  
+1 on alpha-shapes! Learn something new every day! I knew convex hull wasn't exactly the solution, but didn't know about these! – Darren Cope Oct 31 '10 at 23:02
    
excellent! thx. – julien Feb 13 '11 at 0:03
1  
Thank you so much for posting the description of this on your blog. I definitely plan take a look at this soon and see if I can replicate it with my data. It looks fantastic, though! – RyanDalton Feb 14 '11 at 18:00

GRASS' v.net.iso can be used to to create the drive time 'network' which you could pass into a 'convex hull' command to get a polygon. Perhaps not ideal, but would work!

share
1  
Haha - just beat me! – om_henners Oct 27 '10 at 12:19
    
+1 for v.net.iso, but not sure about the convex hull part - see my answer – underdark Oct 27 '10 at 16:12

Well, potentially you could use v.net.iso from GRASS GIS. However it doesn't create polygons (AFAIK), but splits the lines by cost classes from the source.

As for calculating drive times from OSM, you could import the data into GRASS with v.in.osm, and use the v.net.iso to calculate the cost zones. If you wanted travel times and you don't have road speed limits potentially you could calculate the speed limit based on some function of road class.

share

osrm-isochrone is a small node.js library for generating drivetimes.

share

You can use GraphHopper for that task, which also supports different mode like walking or biking and uses OpenStreetMap per default. You'll need some Java coding which explores the road network from the starting point similar to how the Dijkstra algorithms works but then you can get something like the following even in real time (<0.5s):

enter image description here

The code will collect the points which you have to convert to a polygon with e.g. the JTS tools. The speed largely depends on this last step. Without this it would be possible under 0.5s even for large distances.

Another way would be with OpenTripPlanner.

share

You might want to check out the open Route360° JavaScript API, which works with both Leaflet and Google maps. It returns travel time polygons for the following travel modes: walk, bike, car, transit.

Travel time polygons - NYC

It is free and open source and coverage is pretty good. You can find a lot of different tutorials on how to use it on the website.

share

Although not directly answering your question, you should take a look at the Mapnificent API.

Mapnificent provides dynamic public transport travel time maps for many cities in the US and some world wide. You can use the Mapnificent API to augment your Google Maps application with public transport travel time overlays.overlays.

Take a look at London here. alt text

share
    
mapnificent is open source? – Karussell Sep 3 '14 at 16:49

I also stumbled upon gvSIG's Network extension, but the configuration documentation that I have found so far is fairly poor. I have high hopes for it, I just need to figure out the details for calculating cost.

I was using the US Census TIGER data for the road network and actually generated some polygons, but just couldn't get the cost units to really make sense. If anyone has successfully implemented this tool, I would love to hear about it.

I also found Quantum Navigator for QGIS, but I haven't found any recent updates.

share

The result with the concave hull approach is great and I've taken alot of inspiration from the above images. But I noticed that the results can include some areas that are inaccessible by road (like the river, for example). No doubt that this is not a problem in terms of searching for relevant features (population centroids, number of homes) by distance or time from the origin. But it also only works at either end of each link. Again, not an issue in the great majority of cases (since the longest road links have access control - you can't normally get off them until you get to the next junction/intersection).

However, for all that, I've been working on a different approach based on the LINKS returned by PgRouting / (or a raw "Dijkstra" algorithm) ordered by time from the origin node. It's relatively simple and categorizes links by time band and also splits links that cross the time boundaries. Then links with the same categorization (e.g. 0-2 mins, 2-4 mins) are buffered by 250 metres.

share

At this year's WhereCampPDX, several OpenStreetMap representatives stated that using OSM data for routing is fairly common in Europe. However, it is rarer in the US because the map is usually not good enough. You can check out an OSM-based routing service at:

http://openrouteservice.org/

share
1  
And, no routing is not the same thing as drive-time, but it is related. – jvangeld Oct 28 '10 at 0:30
1  
It is kind of routing but "one to all" limited by time or distance – Karussell Sep 3 '14 at 18:13
    
This service works well for me. I didn't get chance to test the accuracy, however it allows me to find e.g. a 1 hour radius around a certain area. Very hand if one has to relocate to an unknown area for work etc. – Roman 2 days ago

This is a great post highlighting available solutions. We went the OSM pgRouting approach for drive time / distance polygons and packaged it up into a service that we are using with our premium Google Maps extension. I am happy to share how we built it if you are interested. Happy to spread the knowledge.

Here is how we ultimately packaged it up.

http://cmapsanalytics.com/drivetime.html

share
1  
Please share your experiences with HOW you did it, not just your product, or risk having your answer removed. See the site guidelines at: Avoid overt self-promotion and How to not be a spammer – RyanDalton Jan 21 '15 at 21:21
    
Point well taken.. My goal was to merely endorse the use of pgRouting as a viable approach for drive time polygons. Knowing some of the creators of pgRouting, I want to endorse and support anywhere that I can that this solution is viable for commercial apps so we can get more users and contributors code and finance to push this further. I should have more clearly stated my intent rather than just sharing what we did. – Ryan Goodman Jun 26 '15 at 2:47
    
How we did it was load the OSM DB into an Amazon EC2 instance, then build a custom function for pgRouting. Then, we built a REST service that executes the function and returns data as geo-json. For a web application, performance is key so we created a cache DB that keeps the polygons for future requests. You do need some beefed up hardware to run this so be prepared to spend some money if you are running everything in AWS. There are cheaper alternatives but that is what we are stuck with. – Ryan Goodman Jun 26 '15 at 2:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.