[GRASS5] r.profile

Bob Covill bcovill at tekmap.ns.ca
Wed Sep 14 11:12:12 EDT 2005


Helena & Hamish,

I sent Peter a test version of r.profile this morning that allows 
coordinates to be piped in. Basically coordinates could be provided in 
three ways ...

coords from file
cat mycoordinates.txt | r.profile input=foo output=bat

select coords interactively
r.profile -i input=foo output=bat

coords on command line
r.profile input=foo output=bat profile=e,n,e,n,...

If you are interested I can make this available for testing.

--
Bob

Helena Mitasova wrote:
> Hamish, could this be incorporated into r.profile or at least provided 
> as a script? There are many applications where this capability is needed 
> and I am sure that many users would appreciate it (especially those who 
> work with coastal data, including myself).
> 
> thanks, Helena
> 
> 
> Hamish wrote:
> 
>>> is there a way to feed profile-coordinates into r.profile through a
>>> file instead of stating them on the command line ?
>>>
>>> cat mycoordinates.txt |r.profile input=foo output=bat profile=-
>>>
>>> and similar approaches do not seem to work.
>>
>>
>>
>>
>> use a shell script:
>>
>> for coord in `cat mycoord.txt` ; do    east1=`echo $coord  | cut -f1 
>> -d'|'`
>>    north1=`echo $coord | cut -f2 -d'|'`
>>    east2=`echo $coord  | cut -f3 -d'|'`
>>    north2=`echo $coord | cut -f4 -d'|'`
>>    echo  >> output.txt
>>    echo "LINE: [$east1, $north1 ; $east2, $north2]" >> output.txt
>>    r.profile input=foo output=- \
>>       profile=$east1,$north1,$east2,$north2 >> output.txt
>> done
>>
>>
>> that assumes format of mycoord.txt is "east1|north1|east2|north2"
>>
>>
>> Hamish
>>




More information about the grass-dev mailing list