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

Error for Mean coordinate(s) when geometry is NULL #24925

Closed
qgib opened this issue Aug 17, 2017 · 2 comments
Closed

Error for Mean coordinate(s) when geometry is NULL #24925

qgib opened this issue Aug 17, 2017 · 2 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

Comments

@qgib
Copy link
Contributor

qgib commented Aug 17, 2017

Author Name: Loïc BARTOLETTI (@lbartoletti)
Original Redmine Issue: 17026
Affected QGIS version: 2.18.11
Redmine category:processing/qgis
Assignee: Victor Olaya


Hi,

A little error when you try to use MeanCoords algorithm with a layer which contain NULL geometry.

The solution is to clean this layer or add maybe add a test on geometry before run the algorithm.

@2017-08-17T11:22:48 2 Uncaught error while executing algorithm
Traceback (most recent call last):
File "C:/Users/da14/.qgis2/python/plugins\processing\core\GeoAlgorithm.py", line 230, in execute
self.processAlgorithm(progress)
File "C:/Users/da14/.qgis2/python/plugins\processing\algs\qgis\MeanCoords.py", line 116, in processAlgorithm
cx = values[0] / values[2]
ZeroDivisionError: integer division or modulo by zero@

You can reproduce it with a testdata (shp_with_null_geometry_extract.shp) and run the algorithm with Unique ID field set to "HubName".
The Null geometries have HubName set to Null.

Tested with QGis 2.14.17, 2.18.11 and master.

Thank you.


@qgib
Copy link
Contributor Author

qgib commented Aug 17, 2017

Author Name: Giovanni Manghi (@gioman)


  • version was changed from 2.14.0 to 2.18.11

@qgib
Copy link
Contributor Author

qgib commented Aug 22, 2017

Author Name: Victor Olaya (@volaya)


Applied in changeset 667ba42.


  • done_ratio was changed from 0 to 100
  • status_id was changed from Open to Closed

@qgib qgib closed this as completed Aug 22, 2017
@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
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