[GRASS-user] calculating average value over a base map

Christian Schwartze christian.schwartze at uni-jena.de
Tue Mar 1 06:47:48 EST 2011

I did similar things on slope values...have a look to the following code snippet:

r.mapcalc slope_mult=int(slope*1000.0)
r.stats -nN input=slope_mult | awk '{print $1"="$1" "$1/1000}' | r.reclass --o input=slope_mult output=slope_labeled
r.statistics --o -c base=base_map cover=slope_labeled method=average output=slope_avg
r.mapcalc slope_avg_cval=int(@slope_avg*1000)/1000.0

Perhaps it may help you...

From: Monica Buescu 
Sent: Tuesday, March 01, 2011 11:40 AM
To: Dmitrij Kolesov ; GRASS user list 
Subject: Re: [GRASS-user] calculating average value over a base map

Hi Dmistrij 
I think it was worked. I just need to figure out something with r.statistics.


grass-user mailing list
grass-user at lists.osgeo.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20110301/99500c64/attachment.html

More information about the grass-user mailing list