[GRASS-user] measuring distance along a line

Michael Barton michael.barton at asu.edu
Thu May 17 02:30:40 EDT 2007




On 5/16/07 8:07 PM, "Hamish" <hamish_nospam at 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





More information about the grass-user mailing list