[GRASSLIST:2282] Re: How to make mosaic of the raster files?

Zbigniew Perski perski at us.edu.pl
Mon Jan 19 05:49:32 EST 2004


Helmer Schack-Kirchner wrote:
> 
> Use the if(when true, choose A, else choose B) function in r.mapcalc. 
> With this function you may decide, which map in case of  overlapping you 
> prefer and you may cut undesired areas. To begin it may be easier, to 
> build the mosaic step by step with only one r.mapcalc if(a,b,c) (with 
> only two maps included) function, but it is also possible to nest the 
> if() function to join all 6 maps in one step.
> Best regards,
> Helmer
> 

Dear Helmer,
Thanks a lot for your help. In the meantime I found an alternative way:
1. Create polygon around interesting part of the map.
2. Associate value=1 to the polygon
3. Rasterize the polygon (with the same grid parameters like oryginal 
map result=mask
4. r.mapcalc: oryginal map * mask = clipped map
As the result of multiplying a map by 1 is the same map but outside the 
  mask multiplyin is returning NaN values and thus the map is clipped.

Best regards

Zbogniew




More information about the grass-user mailing list