Skip to content
Permalink
Browse files

[processing] skip invalid geometries when dissolving (fix #13752)

  • Loading branch information
alexbruy committed Jan 18, 2016
1 parent d2c1668 commit 62a571d6dd3dbdaa97f35cc6795dc064d18b7a82
Showing with 6 additions and 0 deletions.
  1. +6 −0 python/plugins/processing/algs/qgis/Dissolve.py
@@ -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))
@@ -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

0 comments on commit 62a571d

Please sign in to comment.
You can’t perform that action at this time.