[Qgis-user] GRASS Mask Issue QGIS 2.2

Carlos Cerdán sig.upagu at gmail.com
Mon Jul 14 15:01:16 PDT 2014


Hello again:

Perhaps there is an incompatibility between QGIS and GRASS: now QGIS
produces "-inf" (-infinite) values for null cells, so any operation or
function that involves al least one those cells, give us -infinite values
(constant + - * / -infinite = - infinite).

So, as you get -inf values, then scale of values is so large that finally
all is pink color.

I think that it must be fixed to get "null" values again, as in QGIS 1.8
version, because GRASS works with "null" values, not with -inf... or What
do you say, dear developers?.

Regards

Carlos Cerdán



2014-07-14 16:23 GMT-05:00 Ivan Santiago <isantiago at ogp.pr.gov>:

> 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
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20140714/f36bd03e/attachment.html>


More information about the Qgis-user mailing list