[GRASS-dev] MASK seems to be ignored

Michael Barton michael.barton at asu.edu
Tue Feb 5 11:10:51 EST 2008


On Feb 5, 2008, at 8:20 AM, grass-dev-request at lists.osgeo.org wrote:

> Date: Tue, 5 Feb 2008 10:20:02 -0500
> From: "Patton, Eric" <epatton at nrcan.gc.ca>
> Subject: [GRASS-dev] MASK seems to be ignored
> To: <grass-user at lists.osgeo.org>
> Cc: grass-dev at lists.osgeo.org
> Message-ID:
> 	<CA803441152AAE40935609509953BAD201075FB6 at s0-ott-x4.nrn.nrcan.gc.ca>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>
> I'm having problems getting a MASK to actually mask anything.
>
> $ r.mask in=Diff_Nov2007_Oct2007_1m
> MASK created. All subsequent raster operations
> will be limited to MASK area
> Removing or renaming raster file named MASK will
> restore raster operations to normal
> [Raster MASK present]
>
> Yet all refreshes of the gis.m map display window do not clip the  
> display extents
> based on the new mask(see attached png). In the screenshot, the  
> mask is the pink raster,
> and underneath it is another raster in my mapset. Shouldn't the  
> underlying raster's display
> be clipped to that of the mask?
>
> Using r.mapcalc while the mask exists also doesn't seem to obey the  
> extents of the mask, i.e.:
>
> r.mapcalc test = 'Diff_Oct2007_Mar2007_1m'
>
> This creates the raster 'test' with data extents that match  
> Diff_Oct2007_Mar2007_1m, not the mask's
> boundaries.
>
> I'm using svn-trunk compiled from today's source.
>
> ~ Eric.


Eric,

The way I understand it is that a MASK will affect all subsequent  
*read* operations for processing a raster map. That is...

r.mapcalc 'newmap=oldmap'

...will just produce an unaltered copy of oldmap without a MASK; with  
a MASK it will produce a copy of oldmap only in the area of MASK.

MASK will not affect the display. It is for map processing.

Michael





More information about the grass-dev mailing list