[GRASS-dev] r.mask: odd behavior?

Veronica Andreo veroandreo at gmail.com
Sun Nov 19 13:08:38 PST 2017


Hi Markus,

> The issue is the following: I apply a mask, then I do some processing, I
> remove the mask and when I display the resulting map, all the pixels were
> processed. I would expect that those pixels that I masked were treated as
> NULL and not considered exactly as the message says:
>
>
> > "All subsequent raster operations will be limited to the MASK area.
> Removing
> > or renaming raster map named 'MASK' will restore raster operations to
> > normal."
>
> A MASK affects only reading raster data, not writing raster data.
> Therefore r.mapcalc "test = 1" will always produce a map without NULL cells.
>

Got it! That r.mapcalc expression was not reading any map. If I do for
example

r.mapcalc expression="elev1=elevation + 1"

and then remove the mask, it does work as I would have expected.

IMHO, the message is confusing then... not "all" subsequent raster
operations are limited to the mask, only if you read a map...
What about a mask also for writing raster data in GRASS 8 ? :))

cheers,
Vero
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20171119/a835a59e/attachment.html>


More information about the grass-dev mailing list