[GRASS-user] Re: [GRASS-dev] More efficient to use r.mapcalc or r.patch in a l oop for creating mosaics?

Cedric Shock cedricgrass at shockfamily.net
Thu May 11 16:21:02 EDT 2006


Eric, 

There's no point in trying to sort the inputs to r.patch. It'll only increase 
the speed by a small amount (it'll take more than half as much as the maximum 
time at best). It's pretty much guaranteed that the row skipping optimization 
will never apply on mosaic problems anyway because almost every row will have 
one null in it either from the input data, from slight gaps between input 
patches, or the most common: gaps between the input patches and the edge of 
the region.

I'd guess that r.patch is faster than mapcalc due to specialization. It could 
easily be much faster to export the maps and use gdalwarp to compile them 
together (assuming gdalwarp iterates over each input map seperately) and 
re-import the result as Maciek suggested.

--Cedric




More information about the grass-user mailing list