[GRASSLIST:5887] Mosaicking images with mapcalc

Jose Luis Gomez-Dans jgomezdans at yahoo.co.uk
Wed Feb 23 10:27:10 EST 2005


Hi!
I have a number of raster (FCELL) datasets over a large area. I am 
trying to mosaic these into a single raster file, but I don't know how 
to approach some tings.

The individual rasters do have some overlap, and I 
want to have a smooth overlap region (one that is not visible). Over the 
entire overlap region, most of the differences are very small (this is 
expected), but towards the edges, they start to raise. I would like to 
just combine the two raster over the central 60% of the overlap region, 

As an example, let's assume that we only have an overlap in the NS 
region, raster1 goes from -700 to 100, and raster2 from 0 to 800. The 
overlap region is thus 0 to 100. I would like to patch these two 
rasters so that the resulting raster (raster3) goes from -700 to 800, 
and that the value between 20 and 80 is the average of rast2 and rast1.

Working out the average over the whole overlapping region is not hard 
(r.mapcalc 'rast3=0.5*(rast1+rast2)' does it nicely), but how can I 
restrict the overlap region? Do I have to use a mask? is there some 
other way?

Secondly, I have a large number of tiles I want to mosaic (7x7). What's 
the best way to patch them? Can I just average as I outlined above 
(i.e., complete_rast=0.5*(rast11+rast12+rast13...rast77)?

Many thanks!
Jose
 
-- 
Jose L Gomez-Dans, Research Assistant
Bristol Glaciology Centre, Geographical Sciences/CPOM
University of Bristol, Bristol, UK




More information about the grass-user mailing list