[GRASS5] r.profile

Helena Mitasova hmitaso at unity.ncsu.edu
Wed Sep 14 10:52:04 EDT 2005


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
> 
> _______________________________________________
> grass5 mailing list
> grass5 at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass5




More information about the grass-dev mailing list