Bug report #8740

Using Clip tool on a particular vector fails in Processing

Added by Pedro Venâncio about 6 years ago. Updated almost 5 years ago.

Status:Closed
Priority:Low
Assignee:Victor Olaya
Category:Processing/QGIS
Affected QGIS version:2.0.1 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:invalid
Crashes QGIS or corrupts data:No Copied to github as #:17455

Description

New Description:

The problem is with Clip and a specific shapefile (http://goo.gl/pdlURR). It gives this error when I run any Vector Overlay Tool from Processing (Sextante):

Algorithm Clip started
Traceback (most recent call last): File "C:/OSGeo4W/apps/qgis/./python/plugins\\processing\\core\\GeoAlgorithm.py", line 150, in execute self.processAlgorithm(progress) File "C:/OSGeo4W/apps/qgis/./python/plugins\\processing\\algs\\ftools\\Clip.py", line 80, in processAlgorithm geom = QgsGeometry(inFeatA.geometry()) TypeError: arguments did not match any overloaded call: QgsGeometry(): too many arguments QgsGeometry(QgsGeometry): argument 1 has unexpected type 'NoneType'

Old Description:

Hi,

I'm having problems when trying to use the Clip tool more than once on a model, using the same (temporary) layer several times as "clip layer". Basically, it works for the first time but, at the second, fails:

Error executing algorithm 6 Traceback (most recent call last): File "C:/OSGeo4W/apps/qgis/./python/plugins\\processing\\core\\GeoAlgorithm.py", line 150, in execute self.processAlgorithm(progress) File "C:/OSGeo4W/apps/qgis/./python/plugins\\processing\\algs\\ftools\\Clip.py", line 80, in processAlgorithm geom = QgsGeometry(inFeatA.geometry()) TypeError: arguments did not match any overloaded call: QgsGeometry(): too many arguments QgsGeometry(QgsGeometry): argument 1 has unexpected type 'NoneType'

...
...
...

I'm with QGIS 2.0.1 from OSGeo4W.

History

#1 Updated by Pedro Venâncio about 6 years ago

Hi,

I had not realized, but this has nothing to do with modeler. The problem is with Clip and a specific shapefile (http://goo.gl/pdlURR). It gives this error when I run any Vector Overlay Tool from Processing (Sextante):

Algorithm Clip started
Traceback (most recent call last): File "C:/OSGeo4W/apps/qgis/./python/plugins\\processing\\core\\GeoAlgorithm.py", line 150, in execute self.processAlgorithm(progress) File "C:/OSGeo4W/apps/qgis/./python/plugins\\processing\\algs\\ftools\\Clip.py", line 80, in processAlgorithm geom = QgsGeometry(inFeatA.geometry()) TypeError: arguments did not match any overloaded call: QgsGeometry(): too many arguments QgsGeometry(QgsGeometry): argument 1 has unexpected type 'NoneType'
Algorithm Difference started
Traceback (most recent call last): File "C:/OSGeo4W/apps/qgis/./python/plugins\\processing\\core\\GeoAlgorithm.py", line 150, in execute self.processAlgorithm(progress) File "C:/OSGeo4W/apps/qgis/./python/plugins\\processing\\algs\\ftools\\Difference.py", line 81, in processAlgorithm geom = QgsGeometry(inFeatA.geometry()) TypeError: arguments did not match any overloaded call: QgsGeometry(): too many arguments QgsGeometry(QgsGeometry): argument 1 has unexpected type 'NoneType'
Algorithm Intersection started
Traceback (most recent call last): File "C:/OSGeo4W/apps/qgis/./python/plugins\\processing\\core\\GeoAlgorithm.py", line 150, in execute self.processAlgorithm(progress) File "C:/OSGeo4W/apps/qgis/./python/plugins\\processing\\algs\\ftools\\Intersection.py", line 64, in processAlgorithm geom = QgsGeometry( inFeatA.geometry() ) TypeError: arguments did not match any overloaded call: QgsGeometry(): too many arguments QgsGeometry(QgsGeometry): argument 1 has unexpected type 'NoneType'
Algorithm Union started
Traceback (most recent call last): File "C:/OSGeo4W/apps/qgis/./python/plugins\\processing\\core\\GeoAlgorithm.py", line 150, in execute self.processAlgorithm(progress) File "C:/OSGeo4W/apps/qgis/./python/plugins\\processing\\algs\\ftools\\Union.py", line 73, in processAlgorithm geom = QgsGeometry( inFeatA.geometry() ) TypeError: arguments did not match any overloaded call: QgsGeometry(): too many arguments QgsGeometry(QgsGeometry): argument 1 has unexpected type 'NoneType'

But if I run any of this tools thru Vector -> Geoprocessing Tools, it works ok.

The same way, if I export the shapefile to a new shape, then everything works ok, including on Processing (Sextante).

This happens both on windows and Linux.

Any idea about what could it be?

Thanks, and sorry for the original ticket title, as this is not a modeler problem. I can't change the title, so anyone with privileges, please change it.

#2 Updated by Giovanni Manghi about 6 years ago

  • Subject changed from Using clip tool more than once on a model to Using clip tool on a particular vector fails in sextantes
  • Priority changed from Normal to Low
  • Target version changed from Version 2.0.0 to Future Release - High Priority

#3 Updated by Alexander Bruy about 5 years ago

Please provide sample data

#4 Updated by Alexander Bruy almost 5 years ago

  • Category changed from 94 to Processing/QGIS

#5 Updated by Alexander Bruy almost 5 years ago

  • Subject changed from Using clip tool on a particular vector fails in sextantes to Using Clip tool on a particular vector fails in Processing

#6 Updated by Giovanni Manghi almost 5 years ago

  • Status changed from Open to Feedback

#7 Updated by Giovanni Manghi almost 5 years ago

Alexander Bruy wrote:

Please provide sample data

the data is here

http://goo.gl/pdlURR

anyway I suggest to close this ticket. The layer has some peculiar error that makes even postgis make valid fail. On the other hand grass v.overlay and the new ogr based clip tool are working ok. Also a cleaned version (with v.clean) works ok with any tool.

#8 Updated by Pedro Venâncio almost 5 years ago

  • Status changed from Feedback to Closed

I will close this ticket because it seems a problem with this particular file.

The record with attributes

30-12-1899 30-12-1899 2007 0,000 0,000 0,000 0

actually has area zero, and so is a corrupted polygon centered at coordinates [0,0] of the reference system.

Sorry for the noise.

#9 Updated by Giovanni Manghi almost 5 years ago

  • Resolution set to invalid

Also available in: Atom PDF