[GRASSLIST:208] Fwd: Re: Help with distance

Radim Blazek blazek at itc.it
Tue May 27 04:11:52 EDT 2003


On Monday 26 May 2003 18:17, you wrote:
> I'm trying to calculate the distance from one point to another
> along a street/vector layer. I was wondering if grass can help me with
> this.

v.distance in version 5.1 reports also the distance along the line.
If you have crossroads (intersections) between two points, you can consider
to preproces street map and create one line for each street. Something like:

for CODE in echo "select distinct str_cd from viapri" | db.select -c`
do
    v.extract -t input=viapri output=viapri_sel where="str_cd = $CODE"
    v.build.polylines input=viapri_sel output=viapri_p1
    v.patch -a input=viapri_p3 output=viapri_pol
done

Radim




More information about the grass-user mailing list