1

I have a requirement to trace path on the points present in the shapefile which is loaded in QGIS. This should enable the user to specify their own routes within the present network.

There will be existing points and lines present in the shapefile. Whenever the user clicks on the points there should be a line drawn between the points selected and the route should be saved as a shapefile.

I have searched and found in many places of options like pgRouting and shortest path routing and that is not what I require. My need is simple and due to these options being available I'm not able to find a simple solution. It's very much similar to How to route railcars along railroads?, which does not yield a clear solution.

I am new to GIS.

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
sTg
  • 253
  • 2
  • 6
  • 14
  • Brad : This is not any academic assignment. Its a part of a project which i need to complete. The question whicch has been asked in the link specified does not state proper requirement, while i have posted my requirements clearly. Also there has been no answers posted for the question mentioned in the link and was closed. Please guide. – sTg Nov 07 '13 at 05:46
  • I don't have an answer - your question is too broad for me. Perhaps you would care to edit your question with what research you've already done, what tests you've performed, what the results were, what still needs to be done. Surely you didn't just come to gis.SE and ask someone else to do your work for you without making any attempt yourself? – BradHards Nov 07 '13 at 05:49
  • Brad:I have edited the question based on the research i have done – sTg Nov 07 '13 at 06:00

2 Answers2

6

I've written a routing script for QGIS Processing based on the core network analysis library. It expects a point layer and a network layer as input and returns a route between the points. To add the interactive aspect you describe, you'll have to extend the code.

enter image description here

enter image description here

underdark
  • 84,148
  • 21
  • 231
  • 413
0

Your question is not about routes - its about lines (polylines) in shapefiles.

Create a new shapefile as shown at http://www.qgis.org/en/docs/user_manual/working_with_vector/editing_geometry_attributes.html#creating-new-vector-layers

http://www.qgis.org/en/docs/gentle_gis_introduction/data_capture.html tells you how to capture data.

You might like to set up your preferences as shown at http://www.qgis.org/en/docs/user_manual/working_with_vector/editing_geometry_attributes.html to get a nice behaviour.

More information on QGIS is available at http://www.qgis.org/en/docs/index.html

BradHards
  • 12,881
  • 2
  • 37
  • 70