measuring area

Lars Schylberg larss at
Fri Oct 13 04:53:14 EDT 1995

> Hi all,
>	I have a situation in which I am trying to extend (grow) the
> area of a patch in a particular direction, depending on the ajacent
> cell. I want the patch to grow only untill it gets to a specified size
> ( say 20 Hectares). The trouble I have is stopping the growth.  I have
> managed to get the patch to grow by identifying potential growth areas
> and runing the script below
> I would appreciate any suggestion.
> Thanks Joe 

You have to run a r.stats once every loop to determine the size of the 
patch growth.  The result, the area you filter out with awk from the
r.stats command.  That value is assign to a variable that You use to check
for ending criteria in the while loop.

Here is the principle:

SIZE=`r.stats -a output | awk 'pattern plus right column'`

Good luck 


Lars Schylberg                       Email: lasc at
CelsiusTech IT                          or: larss at
S-175 88 Jarfalla                    Tel.   +46 8 580 847 03
Sweden                               Fax.   +46 8 580 123 20

More information about the grass-user mailing list