[Qgis-user] Converting null(no data) to 0

Leo Kris Palao lk.palao at gmail.com
Thu Aug 29 22:44:15 PDT 2013


Dear QGIS Community,

Good Day!

We are currently processing srtm_5 minutes resolution data for asia. We
have polygons (125 features) that covers 9 raster cells each. Our task is
to compute the average cell values using the zonal statistics plugin. In
our data we have negative values and NULL values; we managed to mask those
negative values using raster calculator -- our syntax is *srtm at 1 > 0) *
srtm at 1*. But we are having a problem dealing with the NULL values. We tried
the raster > conversion > translate module and set the No Data value to 0.
It did convert the No Data to 0 values as indicated in the metadata. But
when we clicked on the pixels the value is -3.40282e+38. My observation
was, in the polygons where the pixel values are mix of actual elevation
values and -3.40282e+38, it creates inconsistency in the results. For
instance, we have a polygon that covers 9 cells -- the 7 cells contains
elevation values ranging from 4 to 4.59, and the other two cells have
values -3.40282e+38, the result was: *MEAN = -7.56182992530064e+22* and *SUM
= -6.80564693277058e+22*. If the NULL values have been successfully
converted to 0 the result should be MEAN = 2.90103 and SUM = 26.10925.

How can I do this properly.

Thank you in advance for any suggestion and help.

Thanks,
-Leo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20130830/6fff0796/attachment.html>


More information about the Qgis-user mailing list