Bug report #14639

Zonal statistics generates wrong numbers under Linux

Added by Paolo Cavallini almost 8 years ago. Updated almost 8 years ago.

Status:Closed
Priority:Normal
Assignee:Victor Olaya
Category:Processing/QGIS
Affected QGIS version:master Regression?:No
Operating System:Linux Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:22603

Description

Generating zonal stats from processing (the qgis command) results in numbers that are not correctly sorted (see attached).

zs.dbf.zip (119 KB) Giovanni Manghi, 2016-04-09 01:43 AM

zs2.zip (115 KB) Paolo Cavallini, 2016-04-09 01:53 AM

Associated revisions

Revision 77d95b0d
Added by Alexander Bruy almost 8 years ago

[processing] don't write NaN's to attribute table (fix #14639)

Revision 6b02745e
Added by Alexander Bruy almost 8 years ago

[processing] don't write NaN's to attribute table (fix #14639)

(cherry picked from commit 77d95b0d655022ab5c9f1927fa0a8ddb492b44df)

History

#1 Updated by Alexander Bruy almost 8 years ago

  • Status changed from Open to Feedback

Can not reproduce with my test data using latest master under Linux. Can you share sample?

#2 Updated by Paolo Cavallini almost 8 years ago

Try the geomorpho example form the training manual.
Thanks.

#3 Updated by Alexander Bruy almost 8 years ago

Checked https://github.com/qgis/QGIS-Documentation/blob/master/source/docs/training_manual/processing/geomorpho.rst and it does not contains any links to sample data. I can use any DEM raster for it, right?

#5 Updated by Giovanni Manghi almost 8 years ago

if by wrong results you mean this

https://lists.osgeo.org/pipermail/qgis-developer/attachments/20160407/902f8dd0/attachment.png

then no, I cannot confirm here (result attached).

#6 Updated by Paolo Cavallini almost 8 years ago

Interesting. Then it might be due to local factors (IT locale?). My command:
"/usr/share/qgis/python/plugins/processing/algs/qgis/ZonalStatistics.py", line 230, in processAlgorithm
attrs.insert(idxMin, float(masked.min()))
Results attached.

#7 Updated by Giovanni Manghi almost 8 years ago

  • Subject changed from Zonal statistics generates wrong numbers to Zonal statistics generates wrong numbers under Linux
  • Status changed from Feedback to Open
  • Operating System set to Linux
  • Affected QGIS version changed from 2.14.0 to master

it is just a Linux thing.

#8 Updated by Alexander Bruy almost 8 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF