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
As a slight extension to this, is there a simple way of calculating the
Euclidean distances (triangular matrix) between all pairs of sites stored
in a map. One method is to dump out the site coords, then push it through
a C-prog, but is there a GRASS command that does the trick?
Many thanks
Roy
At 10:11 27/05/03 +0200, Radim Blazek wrote:
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