[GRASS-dev] [GRASS GIS] #2032: r.mapcalc does not always respect MASK
GRASS GIS
trac at osgeo.org
Mon Jul 15 08:30:56 PDT 2013
#2032: r.mapcalc does not always respect MASK
-------------------------+--------------------------------------------------
Reporter: pvanbosgeo | Owner: grass-dev@…
Type: defect | Status: closed
Priority: normal | Milestone: 7.0.0
Component: Raster | Version: unspecified
Resolution: invalid | Keywords: r.mapcalc
Platform: Linux | Cpu: Unspecified
-------------------------+--------------------------------------------------
Changes (by mmetz):
* status: new => closed
* resolution: => invalid
Comment:
Replying to [ticket:2032 pvanbosgeo]:
> If I run:
>
{{{
r.mask raster=mymask
r.mapcalc "test1 = 1"
r.mapcalc "test2 = test1"
r.mask -r
}}}
>
> The layer ''test1'' has value 1 for all raster cells within the current
region. In layer ''test2'' only cells within the masked area have the
value 1, cells outside the mask have nodata, as I would expect.
From the raster intro [0]:
"Raster input maps are automatically masked if a raster map named MASK
exists. The MASK is only applied when ''reading'' maps from the disk."
A MASK is not applied when writing out files. If you set the output cell
value to constant 1, all output cells will have the value 1, even if a
MASK was set while writing the output raster.
[0] http://grass.osgeo.org/grass70/manuals/rasterintro.html
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2032#comment:1>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list