mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
[processing] skip invalid geometries when dissolving (fix #13752)
This commit is contained in:
parent
d2c1668a66
commit
62a571d6dd
@ -71,10 +71,14 @@ class Dissolve(GeoAlgorithm):
|
||||
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 @@ class Dissolve(GeoAlgorithm):
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user