File tree 1 file changed +6
-0
lines changed
python/plugins/processing/algs/qgis
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -71,10 +71,14 @@ def processAlgorithm(self, progress):
71
71
if first :
72
72
attrs = inFeat .attributes ()
73
73
tmpInGeom = QgsGeometry (inFeat .geometry ())
74
+ if tmpInGeom .isGeosEmpty () or not tmpInGeom .isGeosValid ():
75
+ continue
74
76
outFeat .setGeometry (tmpInGeom )
75
77
first = False
76
78
else :
77
79
tmpInGeom = QgsGeometry (inFeat .geometry ())
80
+ if tmpInGeom .isGeosEmpty () or not tmpInGeom .isGeosValid ():
81
+ continue
78
82
tmpOutGeom = QgsGeometry (outFeat .geometry ())
79
83
try :
80
84
tmpOutGeom = QgsGeometry (tmpOutGeom .combine (tmpInGeom ))
@@ -100,6 +104,8 @@ def processAlgorithm(self, progress):
100
104
attrs = inFeat .attributes ()
101
105
tempItem = attrs [fieldIdx ]
102
106
tmpInGeom = QgsGeometry (inFeat .geometry ())
107
+ if tmpInGeom .isGeosEmpty () or not tmpInGeom .isGeosValid ():
108
+ continue
103
109
104
110
if attrDict [unicode (tempItem ).strip ()] == None :
105
111
# keep attributes of first feature
You can’t perform that action at this time.
0 commit comments