Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

In a specific geographic area, I have a road layer and roughly 30 points dispersed around the geographic area as part of a point layer. Both layers are in SHP and PostGIS formats. The records from the point layer correspond to "stops" on the road layer.

How can I calculate the "furthest driving distance at any point in the network to the nearest 'stop' distance is ..."? and as a follow up, can I save that route, or show the furthest points as a different layer?

I'll be using QGIS and OSM or my own road layer data for this.

share|improve this question
add comment

2 Answers

EDIT: This looks like a QGIS plug in that does routing, but it would be a manual / repetitive process:

Possibly easy to fork the code.


Unless you want to write a nice A* algorithm yourself in whatever scripting language QGIS employs you should check out the existing applications / frameworks that can do this for you.

Alternatively, if you do want to 'get right in there' and have a decent level of scripting knowledge, then you need to look at A* algorithms. There are a few references here and there, but this play-list explains it quite well:

http://www.youtube.com/watch?v=_CBhTubi-CU&feature=results_main&playnext=1&list=PLB0CCCCB4627BB28A

Note that if you're using OSM, you will need to have the raw OSM format (ie. ways and nodes), and not the data that has been processed to make it easier to symbolize / render. Reason being, processed data is not route-able. When processing the data, we sacrifice that feature for rendering speed. (Osmosis does, I believe, preserve the ways and nodes in a 'staging' fashion when importing to PostGIS.) That being said, each routing system is going to require a different input format.

On top of that, you're probably not going to get very far wanting to do this 'inside' of QGIS as most of these routing packages are standalone at best. I'd recommend that you look at the C# / Java implementations unless you're feeling brave or have rudimentary c++ knowledge.

As far as retaining your routing results as a separate layer, if you're still with me on this, and you've successfully 'routed' your 'stop' points with one of the suggested packages, I have a feeling that you will know how to do that.

As a final note, if you're using your own road data, it better be topologically correct, otherwise you add a logarithmic level complexity to the search algorithm (speaking from painful personal experience).

share|improve this answer
    
I'm still working on this. I've made some headway but haven't solved the problem totally. I'll keep you posted. –  dassouki Aug 9 '12 at 23:18
    
No worries. Feel free to edit your question if you have any additional stumbling blocks. –  Geoist Aug 10 '12 at 0:38
add comment

If I understand your question correctly, you are trying to answer a similar question to the one I answered in http://underdark.wordpress.com/2011/02/12/drive-time-isochrones/ where I calculated drive times from every point in the network to airport locations.

It should be straightforward to adjust this method based on PostGIS and pgRouting.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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