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 62a571d
Showing 1 changed file with 6 additions and 0 deletions.
@@ -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.