File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed
python/plugins/processing/algs/qgis Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -128,18 +128,11 @@ def processAlgorithm(self, progress):
128
128
for key , value in myDict .items ():
129
129
nElement += 1
130
130
progress .setPercentage (int (nElement * 100 / nFeat ))
131
- for i in range (len (value )):
132
- tmpInGeom = value [i ]
133
-
134
- if i == 0 :
135
- tmpOutGeom = tmpInGeom
136
- else :
137
- try :
138
- tmpOutGeom = QgsGeometry (
139
- tmpOutGeom .combine (tmpInGeom ))
140
- except :
141
- raise GeoAlgorithmExecutionException (
142
- self .tr ('Geometry exception while dissolving' ))
131
+ try :
132
+ tmpOutGeom = QgsGeometry .unaryUnion (value )
133
+ except :
134
+ raise GeoAlgorithmExecutionException (
135
+ self .tr ('Geometry exception while dissolving' ))
143
136
outFeat .setGeometry (tmpOutGeom )
144
137
outFeat .setAttributes (attrDict [key ])
145
138
writer .addFeature (outFeat )
You can’t perform that action at this time.
0 commit comments