Bug report #4396
(fTools) - Check geometry Validity raises exception clicking on errors with no coordinates
|Affected QGIS version:||master||Regression?:|
|Operating System:||all||Easy fix?:|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||14328|
Using the "Check Geometry Validity" in fTools, the user is presented a Dialog with the list of error messages and possibly the corresponding coordinates.
When clickion on error lines like the following, the location of the error is shown on map:
15622,segments 0 and 11 of line 0 intersect at 1506841.69141, 5033355.60175
20415,line 0 contains 1 duplicate node(s) at 14
but with the following error description (which does not contain a coordinate pair or vertex reference):
7607,Unknown geometry type
the following exception is being raised:
An error has occured while executing Python code:
Traceback (most recent call last):
File "/home/sigfrido/.qgis/python/plugins/fTools/tools/doValidate.py", line 97, in zoomToError
x = item.data(Qt.UserRole).toPyObject().x()
AttributeError: 'NoneType' object has no attribute 'x'
I'm using fTools 0.6.1 on QGis 1.71, Ubuntu 10.04
#3 Updated by Luca Sigfrido Percich almost 9 years ago
- File fTools_pg_test_nullgeom.sql added
The absence of coordinates in the error message was due to the PostGIS geometries being NULL.
I attach a simple script for creating a postGIS layer with two records with null geometry.
You can reproduce the problem adding the layer in QGIS as a Multipolygon layer and running the "Check geometry validity" on it.
Sorry for having not done this before, next time I'll try to be more precise and immediately add test data to the ticket.
#8 Updated by Alexander Bruy over 8 years ago
- Assignee deleted (
- Operating System set to all
Seems after refactoring of the QgsGeometryAnalyzer this not true. Check geometry validity now returns nothing (no errors) on this sample data. For me this ticket now part of more general issue with Check geometry validity, see #5070