[GRASSLIST:4551] Averaging Images - easier way?

Daniel Victoria daniel_victoria at yahoo.com
Fri Sep 20 15:26:05 EDT 2002


Hi all,
I need to do an image averaging and I found this on
the list archives:

> I have some problems with r.mapcalc: I have imported
several images with
> r.in.bin. The data are 2 byte ints - everything went
fine. I want to
> calculate an average image by using r.mapcalc. It is
not as simple as it
> sounds first, since there are some gaps in the data
(every day has an
> image, but not all pixels in the images are "not
zero", and the "non
> zero" cells are not at constant places). So I
thought to set up a
> routine that
>
> - adds all images together, resulting in an image
"sum"
> (r.mapcalc sum=day1+day2+day3+...)
>
> - creates an image of a sum of all "if(image)"
resulting in "count"
> (r.mapcalc count=if(day1)+if(day2)+if(day3)+...)
>
> - calculate the avarege by division "sum/count"
> (r.mapcalc average=sum/count)

Is there an easier way to do it in just one simple
command  or is that the only way? Also, if this is the
only way, could someone suggest a script?

Thanks

Daniel

__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com



More information about the grass-user mailing list