[GRASS-dev] RE: [GRASS-user] MASK seems to be ignored

Glynn Clements glynn at gclements.plus.com
Tue Feb 5 18:51:41 EST 2008


Patton, Eric wrote:

> >sure not to do with the problem I had:
> >
> >http://www.nabble.com/MASK-does-not-do-it%27s-work-%28-%
> >29-with-r.mapcalc-td14407246.html#a14407246
> 
> I tried Glynn's method mentioned in that thread, specifically:
> 
> r.mapcalc MASK = '!isnull(MAP)'
> 
> which worked. Checking the range of the raster I used for a mask in my
> r.mask command, it was 0-32767; so shouldn't r.mask in=MAP also create a mask 
> where any non-null cell in the input raster exists?
> 
> Here's the output from r.info for the mask I created using r.mask:

[snip]

MASK maps usually look like this. It would be more useful to see the
r.info output for the original map.

I'm assuming that the original does contain nulls (otherwise the
r.mapcalc method wouldn't do anything either). Is the original map a
reclass map?

The r.mapcalc method creates a completely new map, while r.mask
creates a reclass map. A reclass map takes much less space, but is
affected by any changes to the underlying map (which can be good or
bad, depending upon what you want), and may be susceptible to a
different set of bugs, quirks and corner cases than a normal
(non-reclass) map.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list