5

I have lots of points, and a road (lines) and I would like to calculate from point A to point B (the distance must route through the roads (lines).

I found this QGIS calculate distance of point along a line , but when I'm trying to do a v.distance, I don't see it saving the distance into the DB.

I need the DB to show:

Source      Destination       Distance 
Point A     Point B          10.0011 
Point A     Point C           101.12 
point A     Point D            1212  
Point B     point c           121.0 
point B     Point D         31.0 
...         ...                ...

Any idea?

Thanks!

user10405
  • 111
  • 1
  • 3

1 Answers1

2

You should try Network-Analysis tool (it is in core now). Here is its description in the QGIS documentation. Here is a python-scripting tutorial for network-analysis (it is in Russian, but google-translate should help).

Andrinor
  • 3
  • 2
SS_Rebelious
  • 5,621
  • 3
  • 27
  • 62
  • When I ran the 2nd command from that page : "Director = QgsLineVectorLayerDirector ( MYS_roads , - 1 , '' , '' , '' , 3 )" , it gave me an error: "Traceback (most recent call last): File "", line 1, in NameError: name 'MYS_roads' is not defined. " Where can I get help for this? :) – user10405 Sep 23 '12 at 02:09
  • @user10405, obviously you haven't defined 'MYS_roads' variable. General help (including help from the author of this tool) you can get at this thread. You can freely ask your questions in English there. – SS_Rebelious Sep 23 '12 at 08:33