Skip to content

Commit

Permalink
[processing] skip invalid geometries when dissolving (fix #13752)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Jan 18, 2016
1 parent d2c1668 commit 62a571d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions python/plugins/processing/algs/qgis/Dissolve.py
Expand Up @@ -71,10 +71,14 @@ def processAlgorithm(self, progress):
if first:
attrs = inFeat.attributes()
tmpInGeom = QgsGeometry(inFeat.geometry())
if tmpInGeom.isGeosEmpty() or not tmpInGeom.isGeosValid():
continue
outFeat.setGeometry(tmpInGeom)
first = False
else:
tmpInGeom = QgsGeometry(inFeat.geometry())
if tmpInGeom.isGeosEmpty() or not tmpInGeom.isGeosValid():
continue
tmpOutGeom = QgsGeometry(outFeat.geometry())
try:
tmpOutGeom = QgsGeometry(tmpOutGeom.combine(tmpInGeom))
Expand All @@ -100,6 +104,8 @@ def processAlgorithm(self, progress):
attrs = inFeat.attributes()
tempItem = attrs[fieldIdx]
tmpInGeom = QgsGeometry(inFeat.geometry())
if tmpInGeom.isGeosEmpty() or not tmpInGeom.isGeosValid():
continue

if attrDict[unicode(tempItem).strip()] == None:
# keep attributes of first feature
Expand Down

0 comments on commit 62a571d

Please sign in to comment.