Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Processing QGIS Zonal Stats broken on Windows #22811

Closed
qgib opened this issue May 22, 2016 · 9 comments
Closed

Processing QGIS Zonal Stats broken on Windows #22811

qgib opened this issue May 22, 2016 · 9 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented May 22, 2016

Author Name: Giovanni Manghi (@gioman)
Original Redmine Issue: 14858
Affected QGIS version: master
Redmine category:processing/qgis
Assignee: Victor Olaya


Seems only Windows is affected (the last working release seems to be 2.6).

Try this project

https://github.com/qgis/QGIS-Documentation/tree/master/source/docs/training_manual/exercise_data/processing/more_backends

You'll get

Uncaught error while executing algorithm
Traceback (most recent call last):
File "C:/OSGeo4W/apps/qgis/./python/plugins\processing\core\GeoAlgorithm.py", line 203, in execute
self.processAlgorithm(progress)
File "C:/OSGeo4W/apps/qgis/./python/plugins\processing\algs\qgis\ZonalStatistics.py", line 249, in processAlgorithm
attrs.insert(idxMode, float(mode(masked, axis=None)[0][0]))
File "C:\OSGeo4W\apps\Python27\lib\site-packages
umpy\ma\core.py", line 2941, in getitem
dout = ndarray.getitem(_data, indx)
IndexError: 0-d arrays can't be indexed

on 2.14 and master

and

		Uncaught error while executing algorithm

Traceback (most recent call last):
Traceback (most recent call last):
File "C:/OSGeo4W/apps/qgis-ltr/./python/plugins\processing\core\GeoAlgorithm.py", line 232, in execute
self.processAlgorithm(progress)
File "C:/OSGeo4W/apps/qgis-ltr/./python/plugins\processing\algs\qgis\ZonalStatistics.py", line 105, in processAlgorithm
(startColumn, startRow) = mapToPixel(xMin, yMax, geoTransform)
File "C:/OSGeo4W/apps/qgis-ltr/./python/plugins\processing\tools
aster.py", line 68, in mapToPixel
gdal.InvGeoTransform(geoTransform)[1], mX, mY)
TypeError: not a sequence

on 2.8

@qgib
Copy link
Contributor Author

qgib commented May 23, 2016

Author Name: Alexander Bruy (@alexbruy)


Tested with geomorpho.qgs project (more_backends.qgs seems does not have any raster layers in it) under Windows using latest qgis-dev package — no errors, statistics calculated correctly. I got same results as under Linux.

@qgib
Copy link
Contributor Author

qgib commented May 23, 2016

Author Name: Alexander Bruy (@alexbruy)


Issue with 2.8.9 confirmed, I also got

Uncaught error while executing algorithm
Traceback (most recent call last):
Traceback (most recent call last):
  File "C:/OSGEO4~1/apps/qgis-ltr-dev/./python/plugins\\processing\\core\\GeoAlgorithm.py", line 232, in execute
    self.processAlgorithm(progress)
  File "C:/OSGEO4~1/apps/qgis-ltr-dev/./python/plugins\\processing\\algs\\qgis\\ZonalStatistics.py", line 105, in processAlgorithm
    (startColumn, startRow) = mapToPixel(xMin, yMax, geoTransform)
  File "C:/OSGEO4~1/apps/qgis-ltr-dev/./python/plugins\\processing\\tools\
aster.py", line 68, in mapToPixel
    gdal.InvGeoTransform(geoTransform)[1], mX, mY)
TypeError: not a sequence

@qgib
Copy link
Contributor Author

qgib commented May 23, 2016

Author Name: Giovanni Manghi (@gioman)


Alexander Bruy wrote:

Tested with geomorpho.qgs project (more_backends.qgs seems does not have any raster layers in it) under Windows using latest qgis-dev package — no errors, statistics calculated correctly. I got same results as under Linux.

weird you don't get errors in 2.14 or master, I have clean testing environments on windows and I see the same on both OSes.

@qgib
Copy link
Contributor Author

qgib commented May 23, 2016

Author Name: Alexander Bruy (@alexbruy)


Fix for 2.8.x commited.

@qgib
Copy link
Contributor Author

qgib commented May 23, 2016

Author Name: Giovanni Manghi (@gioman)


Alexander Bruy wrote:

Fix for 2.8.x commited.

still can't replicate the other error on 2.14/master?

@qgib
Copy link
Contributor Author

qgib commented May 23, 2016

Author Name: Alexander Bruy (@alexbruy)


Yes, no error on master.

@qgib
Copy link
Contributor Author

qgib commented May 23, 2016

Author Name: Giovanni Manghi (@gioman)


Alexander Bruy wrote:

Yes, no error on master.

tested Windows right (is only Windows issue)?

@qgib
Copy link
Contributor Author

qgib commented May 24, 2016

Author Name: Alexander Bruy (@alexbruy)


Yes, I tested on Windows and can't reproduce this

@qgib
Copy link
Contributor Author

qgib commented May 24, 2016

Author Name: Alexander Bruy (@alexbruy)


Seems works fine on all systems now


  • resolution was changed from to fixed/implemented
  • status_id was changed from Open to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms labels May 25, 2019
@qgib qgib added this to the Version 2.16 milestone May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms
Projects
None yet
Development

No branches or pull requests

1 participant