[Qgis-user] GRASS Mask Issue QGIS 2.2

David John Beaton Pearce david at sapura.com.my
Tue Jul 15 17:41:26 PDT 2014


I am also sometimes getting the same infinity problem with the openlayers plugin on QGIS 2.4 on Windows 7 64 bit. The result is that QGIS hangs and has to be forced closed

Regards
David Pearce

From: qgis-user-bounces at lists.osgeo.org [mailto:qgis-user-bounces at lists.osgeo.org] On Behalf Of Carlos Cerdán
Sent: Tuesday, 15 July, 2014 6:01 AM
To: qgis-user at lists.osgeo.org
Subject: Re: [Qgis-user] GRASS Mask Issue QGIS 2.2

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<mailto: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<http://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<mailto:Qgis-user at lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/qgis-user


________________________________
The contents of this e-mail are confidential and may be privileged. If you are not the intended recipient, please do not read, use, print, copy, forward or distribute the contents or disclose it to anyone. Instead, please inform us by return e-mail and delete it from your system immediately. Opinions, conclusions and other information in this message shall not be deemed or understood to be given nor endorsed by the Sapura Group, unless it is separately confirmed in writing by the relevant duly authorised personnel of the Sapura Group. All liability for computer viruses is excluded to the fullest extent permitted by law.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20140716/f548bb98/attachment.html>


More information about the Qgis-user mailing list