[GRASS-user] sum of several raster maps

Hi,
I have several Raster Maps (1 - 365). I would like to create one map by adding all these maps together.
Is there any function to do so without using

r.mapcalc map = map1 + map2 + map3....+map365

Grettings.

Andi

--
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

Andi Jochem wrote on 04/19/2007 03:40 PM:

Hi,
I have several Raster Maps (1 - 365). I would like to create one map by adding all these maps together.
Is there any function to do so without using

r.mapcalc map = map1 + map2 + map3....+map365

You can use r.series. See
   g.manual r.series
for an example with wildcards.

Markus

------------------
ITC -> dall'1 marzo 2007 Fondazione Bruno Kessler
ITC -> since 1 March 2007 Fondazione Bruno Kessler
------------------

Hi Andi,

On Thu, 19 Apr 2007 15:40:28 +0200
"Andi Jochem" <Andruit@gmx.de> wrote:

Hi,
I have several Raster Maps (1 - 365). I would like to create one map by adding
all these maps together.
Is there any function to do so without using

r.mapcalc map = map1 + map2 + map3....+map365

what about r.series input=map1,map2,map3,.. method=sum ?

regards,
  Otto

Grettings.

Andi

--

On Apr 19 [15:40], Andi Jochem wrote:

Hi,
I have several Raster Maps (1 - 365). I would like to create one map by adding all these maps together.
Is there any function to do so without using

r.mapcalc map = map1 + map2 + map3....+map365

why not use r.mapcalc?

$ str="r.mapcalc map = map1"
$ for i in `seq 2 365`; do str=$str+" + map$i"; done
$ $str

\f.

--
Florian Kindl
Institute of Geography
University of Innsbruck

Andi wrote:
> I have several Raster Maps (1 - 365). I would like to create one map
> by adding all these maps together.
> Is there any function to do so without using
>
> r.mapcalc map = map1 + map2 + map3....+map365

Otto wrote:

what about r.series input=map1,map2,map3,.. method=sum ?

Note prior to GRASS 6.2 there was a limit on the maximum number of open
files in lib/gis/G.h (256), but that has since been removed. You used to
have to increase that number to 400 or so and recompile GRASS to use
that many maps. Also the number of open files must be smaller than the
operating system's limit. (Given by `cat /proc/sys/fs/file-max` in Linux
2.4) See the comments in raster/r.patch/nfiles.h in the source code.
(can we increase or remove the limit in r.patch now?)

g.mlist is your friend for constructing a comma separated list of input
maps.

Hamish

Hamish wrote:

> > I have several Raster Maps (1 - 365). I would like to create one map
> > by adding all these maps together.
> > Is there any function to do so without using
> >
> > r.mapcalc map = map1 + map2 + map3....+map365
>

Otto wrote:
> what about r.series input=map1,map2,map3,.. method=sum ?

Note prior to GRASS 6.2 there was a limit on the maximum number of open
files in lib/gis/G.h (256), but that has since been removed. You used to
have to increase that number to 400 or so and recompile GRASS to use
that many maps. Also the number of open files must be smaller than the
operating system's limit. (Given by `cat /proc/sys/fs/file-max` in Linux
2.4) See the comments in raster/r.patch/nfiles.h in the source code.
(can we increase or remove the limit in r.patch now?)

I've removed the limit from r.patch.

--
Glynn Clements <glynn@gclements.plus.com>