[GRASS-user] measuring distance along a line

Hi everybody,
is there a possibility to measure distance along a line in grass?
I have a map of a river system and I have points (given by Northing and
Easting) where rivers con- or diverge. Now I would like know the distance
between those points, measured along the course of the river. Is there a
possibility to do that in grass without having to measure the distance by
hand (i.e. using the measuring tool in the display window)?

I am using grass 6.2 on SuSE 10.2.

Help would be much appreciated,

Ronja

Ronja Düffel wrote:

is there a possibility to measure distance along a line in grass?

yes.

I have a map of a river system and I have points (given by Northing
and Easting) where rivers con- or diverge. Now I would like know the
distance between those points, measured along the course of the
river. Is there a possibility to do that in grass without having to
measure the distance by hand (i.e. using the measuring tool in the
display window)?

Beware that this is a fractal problem and the answer is dubious!

maybe something like:

v.clean in=rivers out=river_lines tool=break
v.db.addcol river_lines column="seg_length DOUBLE PRECISION"
v.to.db river_lines option=length column=seg_length units=me

d.vect river_lines disp=shape,attr attrcol=seg_length

you might also look at v.segment and v.lrs.*

Hamish

Thanks for the fast reply, I'll try your suggestion and report back to the
list.

Ronja

Am Dienstag, 15. Mai 2007 13:13 schrieben Sie:

Ronja Düffel wrote:
> is there a possibility to measure distance along a line in grass?

yes.

> I have a map of a river system and I have points (given by Northing
> and Easting) where rivers con- or diverge. Now I would like know the
> distance between those points, measured along the course of the
> river. Is there a possibility to do that in grass without having to
> measure the distance by hand (i.e. using the measuring tool in the
> display window)?

Beware that this is a fractal problem and the answer is dubious!

maybe something like:

v.clean in=rivers out=river_lines tool=break
v.db.addcol river_lines column="seg_length DOUBLE PRECISION"
v.to.db river_lines option=length column=seg_length units=me

d.vect river_lines disp=shape,attr attrcol=seg_length

you might also look at v.segment and v.lrs.*

Hamish

Something that just struck me. You might well be able to get some
reasonabley accurate information on this simply by running r.profile. It
will output cumulative distance along a line--specified by a series of xy
points--along with the value of a raster (e.g., elevation) at each point.

Michael

On 5/16/07 1:42 AM, "Ronja Düffel" <dueffel@informatik.uni-frankfurt.de>
wrote:

Thanks for the fast reply, I'll try your suggestion and report back to the
list.

Ronja

Am Dienstag, 15. Mai 2007 13:13 schrieben Sie:

Ronja Düffel wrote:

is there a possibility to measure distance along a line in grass?

yes.

I have a map of a river system and I have points (given by Northing
and Easting) where rivers con- or diverge. Now I would like know the
distance between those points, measured along the course of the
river. Is there a possibility to do that in grass without having to
measure the distance by hand (i.e. using the measuring tool in the
display window)?

Beware that this is a fractal problem and the answer is dubious!

maybe something like:

v.clean in=rivers out=river_lines tool=break
v.db.addcol river_lines column="seg_length DOUBLE PRECISION"
v.to.db river_lines option=length column=seg_length units=me

d.vect river_lines disp=shape,attr attrcol=seg_length

you might also look at v.segment and v.lrs.*

Hamish

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

On Tue, 2007-05-15 at 10:42 +0200, Ronja Düffel wrote:

Hi everybody,
is there a possibility to measure distance along a line in grass?
I have a map of a river system and I have points (given by Northing and 
Easting) where rivers con- or diverge. Now I would like know the distance 
between those points, measured along the course of the river. Is there a 
possibility to do that in grass without having to measure the distance by 
hand (i.e. using the measuring tool in the display window)?

I’m sure you want to do this in GRASS, but if all you really need is the distance, take a look at:

www.lrcf.net/mapping

You can measure distances over any points that you place on Google Maps.

HTH,


Bob Smither <bobsmither@lrcf.net>

Michael Barton wrote:

Something that just struck me. You might well be able to get some
reasonabley accurate information on this simply by running r.profile.
It will output cumulative distance along a line--specified by a series
of xy points--along with the value of a raster (e.g., elevation) at
each point.

will that only give you a final distance as a multiple of the res= option?

(use the SWIG* ... G_begin_distance_calculations() + G_distance() )

[*] first we have to make it work.. continued on the -dev list

Hamish

On 5/16/07 8:07 PM, "Hamish" <hamish_nospam@yahoo.com> wrote:

Michael Barton wrote:

Something that just struck me. You might well be able to get some
reasonabley accurate information on this simply by running r.profile.
It will output cumulative distance along a line--specified by a series
of xy points--along with the value of a raster (e.g., elevation) at
each point.

will that only give you a final distance as a multiple of the res= option?

(use the SWIG* ... G_begin_distance_calculations() + G_distance() )

[*] first we have to make it work.. continued on the -dev list

Hamish

Actually it give you the total over the entire profile (which can be
composed of multiple points) and cumulative distance at regular intervals
along the profile

r.profile input=elevation.10m output=- profile=593105,4917646,606410,4924314
res=1000 null=*

Using resolution [1000]

Output Format:

[Along Track Dist.(m)] [Elevation]

Approx. transect length [14882.380859] m
0.000000 1659.713745
1000.000000 1445.286255
2000.000000 1612.673096
3000.000000 1488.430786
4000.000000 1567.370361
5000.000000 1446.272461
6000.000000 1380.753418
7000.000000 1366.237671
8000.000000 1279.122803
9000.000000 1232.739990
10000.000000 1220.627930
11000.000000 1192.969482
12000.000000 1176.757935
13000.000000 1224.817505
14000.000000 1272.382935
14000.000000 1272.382935

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton