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.

I am having shapefiles for a particular map location, the shapefile consists of points and polylines. Now I want to find the shortest path between the points. What is perfect and simple method to find shortest path.

share|improve this question
    
You have not specified restrictions (do you want obstacle avoidance? Do you want smooth turns? etc. etc.) Look up Delaunay triangulations/Voronoi diagrams, A* algorithm and its derivatives. One of the approaches is based on transforming the shapefile into a graph and running a modification of A* on it. –  Deer Hunter Mar 20 '13 at 7:10
2  
You will need pgrouting/postgis to do this in QGIS see Devdatta Tengshe's answer. –  Mapperz Mar 20 '13 at 14:21
add comment

3 Answers

up vote 1 down vote accepted

Since you have not mentioned what tool you are working in, here goes my suggestion.

I have just started my work on the similar task and Network Analyst (ArcGIS) gives you good results in what you are looking for. Try this out. http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Network_Analyst_Tutorial

You can also load your shapefile to google earth pro and carry out your task.

share|improve this answer
    
I am using QuantumGiS and Postgresql till now –  Gurucharan Vijayakumar Mar 20 '13 at 6:30
    
Google Earth Pro is Simple work, Thanks for referring this , Thank you once again .. –  Gurucharan Vijayakumar Mar 21 '13 at 12:56
add comment

If you are looking for a OpenSource Solution, you need to look at pgRouting.

You can upload your shapefiles in to postgis, and then run pgrouting on it.

To get started with pgRouting, I would suggest this workshop.

share|improve this answer
    
Thanks sir ! I had already involved in pgrouting ... –  Gurucharan Vijayakumar Mar 21 '13 at 12:57
add comment

QGIS 2.0 contains all the functionality necessary to calculate shortest paths. The API is documented here: http://www.qgis.org/en/docs/pyqgis_developer_cookbook/network_analysis.html

I've created a Processing script for the use case of routing between consecutive points: http://anitagraser.com/2013/10/19/a-routing-script-for-the-processing-toolbox/

enter image description here

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.