qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.09k stars 2.93k forks source link

ftools lines to polygons fails on a particular vector #16172

Closed qgib closed 5 years ago

qgib commented 11 years ago

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


error is

@An error has occured while executing Python code:

Traceback (most recent call last): File "/usr/share/qgis/python/plugins/fTools/tools/doGeometry.py", line 347, in run success = self.lines_to_polygons() File "/usr/share/qgis/python/plugins/fTools/tools/doGeometry.py", line 524, in lines_to_polygons outFeat.setGeometry( QgsGeometry.fromPolygon( polyGeom ) ) TypeError: QgsFeature.setGeometry(QgsGeometry): argument 1 has unexpected type 'NoneType'

Python version: 2.7.3 (default, Aug 1 2012, 05:25:23) [GCC 4.6.3]

QGIS version: 1.9.0-Master Master, exported

Python path: ['/usr/share/qgis/python/plugins/sextante', '/home/gio/.qgis//python/plugins/permaclim', '/usr/share/qgis/python', '/home/gio/.qgis//python', '/home/gio/.qgis//python/plugins', '/usr/share/qgis/python/plugins', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PIL', '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode', '/home/gio/.qgis/python/plugins/mmqgis/forms', '/usr/share/qgis/python/plugins/fTools/tools']@


qgib commented 11 years ago

Author Name: maning sambale (maning sambale)


Confirmed error tested both in the:

Vector menu (fTools)

An error has occured while executing Python code:

Traceback (most recent call last): File "/usr/share/qgis/python/plugins/fTools/tools/doGeometry.py", line 347, in run success = self.lines_to_polygons() File "/usr/share/qgis/python/plugins/fTools/tools/doGeometry.py", line 515, in lines_to_polygons outFeat.setGeometry( QgsGeometry.fromPolygon( polyGeom ) ) TypeError: QgsFeature.setGeometry(QgsGeometry): argument 1 has unexpected type 'NoneType'

Python version: 2.7.3 (default, Aug 1 2012, 05:25:23) [GCC 4.6.3]

QGIS version: 1.9.0-Master Master, exported

Python path: ['/usr/share/qgis/python/plugins/sextante', '/usr/share/qgis/python', '/home/maning/.qgis2/python', '/home/maning/.qgis2/python/plugins', '/usr/share/qgis/python/plugins', '/usr/local/lib/python2.7/dist-packages/docutils-0.7-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/Jinja2-2.5.5-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/Pygments-1.4-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/mbutil-0.0.1-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/Sphinx-1.1.2-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/rst2pdf-0.16-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/reportlab-2.5-py2.7-linux-x86_64.egg', '/usr/local/lib/python2.7/dist-packages/TracGit-0.11.0.2-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/sphinxcontrib_googlechart-0.1.5-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/funcparserlib-0.3.5-py2.7.egg', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PIL', '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/lib/python2.7/dist-packages/ubuntuone-client', '/usr/lib/python2.7/dist-packages/ubuntuone-control-panel', '/usr/lib/python2.7/dist-packages/ubuntuone-couch', '/usr/lib/python2.7/dist-packages/ubuntuone-installer', '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol', '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode', '/usr/share/qgis/python/plugins/fTools/tools', '/home/maning/Desktop/qgis_hackfest']

and also in Sextante.

qgib commented 11 years ago

Author Name: Giovanni Manghi (@gioman)


no more error message, but it never ends to run.

qgib commented 11 years ago

Author Name: Giovanni Manghi (@gioman)


qgib commented 10 years ago

Author Name: Giovanni Manghi (@gioman)


looking at it better and I realized that is a very edge case... the lines that seems continuous are mostly split and anyway there is the problem of the line(s) delimiting the Mediterranean that would be originating an inverted polygon...


qgib commented 7 years ago

Author Name: Giovanni Manghi (@gioman)


The "ftools" category is being removed from the tracker, changing the category of this ticket to "Processing/QGIS" to not leave the category orphaned.