Bug report #13358

Eliminate sliver polygons error

Added by Jos Ferraro over 8 years ago. Updated over 8 years ago.

Status:Closed
Priority:Low
Assignee:-
Category:Vectors
Affected QGIS version:2.6.1 Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:21411

Description

When trying to use the tool "Eliminate sliver polygons" I get the following error

An error has occured while executing Python code:

Traceback (most recent call last):
File "C:\\PROGRA~1\\QGISBR~1\\apps\\qgis\\python\\plugins\\fTools\\tools\\doEliminate.py", line 91, in accept
self.eliminate(inLayer, boundary, self.progressBar, outFileName)
File "C:\\PROGRA~1\\QGISBR~1\\apps\\qgis\\python\\plugins\\fTools\\tools\\doEliminate.py", line 182, in eliminate
if 0 AttributeError: 'NoneType' object has no attribute 'length'

Python version:
2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]

QGIS version:
2.6.1-Brighton Brighton, e2a51df

Python path: ['C:/PROGRA~1/QGISBR~1/apps/qgis/./python/plugins\\\\processing', 'C:/PROGRA~1/QGISBR~1/apps/qgis/./python', u'D:/Users/jose.ferraro/.qgis2/python', u'D:/Users/jose.ferraro/.qgis2/python/plugins', 'C:/PROGRA~1/QGISBR~1/apps/qgis/./python/plugins', 'C:\\\\PROGRA~1\\\\QGISBR~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\matplotlib-1.3.1-py2.7-win-amd64.egg', 'C:\\\\PROGRA~1\\\\QGISBR~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\
ose-1.3.3-py2.7.egg', 'C:\\\\PROGRA~1\\\\QGISBR~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\tornado-4.0.1-py2.7-win-amd64.egg', 'C:\\\\PROGRA~1\\\\QGISBR~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\backports.ssl_match_hostname-3.4.0.2-py2.7.egg', 'C:\\\\PROGRA~1\\\\QGISBR~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\certifi-14.05.14-py2.7.egg', 'D:\\\\Scripts', 'C:\\\\Program Files\\\\QGIS Brighton\\\\apps\\\\qgis\\\\python', 'C:\\\\Program Files\\\\QGIS Brighton', 'C:\\\\Program Files\\\\QGIS Brighton\\\\apps\\\\Python27', 'C:\\\\PROGRA~1\\\\QGISBR~1\\\\bin\\\\python27.zip', 'C:\\\\PROGRA~1\\\\QGISBR~1\\\\apps\\\\Python27\\\\DLLs', 'C:\\\\PROGRA~1\\\\QGISBR~1\\\\apps\\\\Python27\\\\lib', 'C:\\\\PROGRA~1\\\\QGISBR~1\\\\apps\\\\Python27\\\\lib\\\\plat-win', 'C:\\\\PROGRA~1\\\\QGISBR~1\\\\apps\\\\Python27\\\\lib\\\\lib-tk', 'C:\\\\PROGRA~1\\\\QGISBR~1\\\\bin', 'C:\\\\PROGRA~1\\\\QGISBR~1\\\\apps\\\\Python27', 'C:\\\\PROGRA~1\\\\QGISBR~1\\\\apps\\\\Python27\\\\lib\\\\site-packages', 'C:\\\\PROGRA~1\\\\QGISBR~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\PIL', 'C:\\\\PROGRA~1\\\\QGISBR~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\jinja2-2.7.2-py2.7.egg', 'C:\\\\PROGRA~1\\\\QGISBR~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\markupsafe-0.23-py2.7-win-amd64.egg', 'C:\\\\PROGRA~1\\\\QGISBR~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\pytz-2012j-py2.7.egg', 'C:\\\\PROGRA~1\\\\QGISBR~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\win32', 'C:\\\\PROGRA~1\\\\QGISBR~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\win32\\\\lib', 'C:\\\\PROGRA~1\\\\QGISBR~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\Pythonwin', 'C:\\\\PROGRA~1\\\\QGISBR~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\Shapely-1.2.18-py2.7-win-amd64.egg', 'C:\\\\PROGRA~1\\\\QGISBR~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\six-1.3.0-py2.7.egg', 'C:\\\\PROGRA~1\\\\QGISBR~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\wx-2.8-msw-unicode', 'C:\\\\PROGRA~1\\\\QGISBR~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\xlrd-0.9.2-py2.7.egg', 'C:\\\\PROGRA~1\\\\QGISBR~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\xlwt-0.7.5-py2.7.egg', 'C:\\\\PROGRA~1\\\\QGISBR~1\\\\apps\\\\qgis\\\\python\\\\plugins\\\\fTools\\\\tools', 'D:/Boulot/Metroferrovi\\xc3\\xa1rio/vvetoriza\\xc3\\xa7\\xc3\\xa3o/Densidade \\xc3\\x81rea Constru\\xc3\\xadda por Quadra']

the shapefile is attached. The selected features are the 0 and 674.

problema.rar (1.56 MB) Jos Ferraro, 2015-09-14 08:32 AM

History

#1 Updated by Saber Razmjooei over 8 years ago

  • Priority changed from Normal to Low
  • Status changed from Open to Feedback
  • Category set to Vectors

Feature 0 does not appear to have any geometry?
In QGIS 2.8.3 it works fine on 674.

#2 Updated by Jos Ferraro over 8 years ago

Hi ,
thanks for looking into this.
You are correct in saying that it works for feature 674. The error however does not state which feature(if one specific at all) is the problem.
After some investigation, it is clear that feature 0 is the problem.
It does have a geometry, even if it's slightly difficult to see. If you zoom enough you should be able to see, it's about 1.3 centimeters wide. This is to be expected for a feature on which one is trying to apply Eliminate sliver polygons tool, right?
BTW, tested with 2.8.3 and the problem is NOT solved.

#3 Updated by Saber Razmjooei over 8 years ago

I'd suggest using another tool (e.g. v.clean) from processing.

#4 Updated by Jos Ferraro over 8 years ago

  • Status changed from Feedback to Closed

This error is mostly likely caused by an invalid geometry.
This invalid geometry was however created by QGIS itself, so I reported a new bug #13368 and will close this one
Thanks for helping

Also available in: Atom PDF