<div dir="ltr"><div><div><br><br>On Sun, Nov 19, 2017 at 9:19 PM, Veronica Andreo <<a href="mailto:veroandreo@gmail.com">veroandreo@gmail.com</a>> wrote:<br>><br>> Hi devs,<br>><br>> I found that r.mask does not behave as I would expect and I would really appreciate some clarification.<br>><br>> 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:<br>><br>> "All subsequent raster operations will be limited to the MASK area. Removing<br>> or renaming raster map named 'MASK' will restore raster operations to<br>> normal."<br><br></div>A MASK affects only reading raster data, not writing raster data. Therefore r.mapcalc "test = 1" will always produce a map without NULL cells.<br><br></div>Markus M<br><div><div><br>><br>> Otherwise, what's the point of applying a mask?<br>><br>> This is an example with NC:<br>><br>> g.region raster=landcover_1m -p<br>> r.category landcover_1m<br>> r.mask raster=landcover_1m maskcats="1 thru 6"<br>> d.mon wx0<br>> d.rast landcover_1m<br>> r.mapcalc "applied_mask = 1"<br>> r.mask -r<br>> d.erase<br>> d.rast applied_mask <<-- everything is there, no holes...<br>><br>> The only operation that gave me what I would expect when I apply a mask was:<br>> r.mapcalc expression="applied_mask=1-MASK"<br>><br>> Can someone, please, test/clarify this?<br>><br>> thanks much in advance!<br>> Vero<br>><br>> _______________________________________________<br>> grass-dev mailing list<br>> <a href="mailto:grass-dev@lists.osgeo.org">grass-dev@lists.osgeo.org</a><br>> <a href="https://lists.osgeo.org/mailman/listinfo/grass-dev">https://lists.osgeo.org/mailman/listinfo/grass-dev</a><br><br></div></div></div>