[GRASS-user] r.mapcalc --> 3 maps

Sylvain Maillard sylvain.maillard at gmail.com
Sun Jan 16 11:55:54 EST 2011


" *r.patch* - Creates a composite raster map layer by using known category
values from one (or more) map layer(s) to fill in areas of "no data" in
another map layer. "

" The GRASS program *r.patch* allows the user to build a new raster map the
size and resolution of the current region by assigning known data values
from input raster maps to the cells in this region. This is done by filling
in "no data" cells, those that do not yet contain data, contain NULL data,
or, optionally contain 0 data, with the data from the first input map. Once
this is done the remaining holes are filled in by the next input map, and so
on. This program is useful for making a composite raster map layer from two
or more adjacent map layers, for filling in "holes" in a raster map layer's
data (e.g., in digital elevation data), or for updating an older map layer
with more recent data. The current geographic region definition and mask
settings are respected. "

http://grass.osgeo.org/grass64/manuals/html64_user/r.patch.html



2011/1/16 Gabriele N. <gis.gn at libero.it>

>
> Ciao grass users.
>
> I have three maps A, B, C.
>
> I would use r.mapcalc to combine them according to this logic:
> Put the values of A and if A is null you put the values of B and if B is
> null you put the values of C.
>
> I have tried in various ways without success. .. now I'm trying with a
> double IF...
> r.mapcalc "output = if((isnull(a)),b,if(isnull(b)),c)"  .....but in this
> case I do not put the values of A
>
>
> Help / advice?
>
> Thanks
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/r-mapcalc-3-maps-tp5929440p5929440.html
> Sent from the Grass - Users mailing list archive at Nabble.com.
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
-------------- section suivante --------------
Une pi?ce jointe HTML a ?t? enlev?e...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20110116/4cb5976e/attachment.html


More information about the grass-user mailing list