[GRASS-user] More efficient to use r.mapcalc or r.patch in a loop for creating mosaics?

Patton, Eric epatton at nrcan.gc.ca
Thu May 11 13:16:32 EDT 2006


I'm writing a script to mosaic an arbitrary number of rasters together. So
far, the script works fine, using the following mapcalc statement in a 'for'
loop:

r.mapcalc "$OUTPUT=if(isnull(Map_A), Map_B, Map_A)"

I should note that I'm reading the map names in through an array which was
populated in a previous step. My question is: Is there an advantage in using
r.mapcalc over using r.patch for this work? At 1m resolution rasters, and
about 60+ of them, this could take a long time.

~ Eric.




More information about the grass-user mailing list