[QGIS-Developer] QgsRasterBandStats returns nan for mean and sum of squares in QGIS3.4

Luis Eduardo luis3176 at yahoo.com
Sun Aug 30 09:02:09 PDT 2020


Greetings, I would greatly appreciate your help.
I have a problem with certain raster files in QGIS 3.4. When requesting statistics via QgsRasterBandStats the average, the sum returns nan.The other statistics minimum, maximum, sum of squares and standard deviation if they return expected values, float.
I think, that the error could be that the method considers the nan in the calculation, in the mean and sum.
How can I solve it? What alternative is there?
I want to avoid the alternative of reading the raster with Gdal again directly. In that case it would be better to redo all my code and work directly with GDal and numpy

Thank you for your attention
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20200830/76426c5e/attachment.html>


More information about the QGIS-Developer mailing list