[Qgis-user] GRASS Mask Issue QGIS 2.2
Ivan Santiago
isantiago at ogp.pr.gov
Mon Jul 14 14:23:27 PDT 2014
Hello all:
Thanks to Carlos Cerdan for his advice. Apparently, QGIS has some issues with integer rasters containing nodata values. When the raster for masking use is floating point, QGIS does not paint nodata cells. On the contrary, when the original raster is integer, QGIS fills nodata cells with pink color (which makes no sense). The big problem/question is why even if the mask exists, further rasters will not have nodata values outside the AOI.
Then...
Following Carlos' advice, I converted nodata cells to zero using r.null.to
Since my purpose is to compute area coverage and percent coverage for risk zones inside a municipality:
I multiplied the 1,0 raster layer by the integer risk_index (that is 1to5)
Then I used r.null.val to set zero value cells to nodata because I wanted to use r.stats to compute areas and percentages with the option of ignoring nodata cells.
Finally (and happily) the r.stats results were more realistic, taking away the area outside the "mask".
---------------------------
Iván Santiago
GIS Specialist
Information Technologies
Office of Management and Budget
787.725.9420 x 2378
Calle Cruz 254
PO Box 9023228
San Juan, PR 00902-3228
http://gis.pr.gov
More information about the Qgis-user
mailing list