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 @@ -164,18 +164,11 @@ def processAlgorithm(self, progress):
164
164
for key , value in myDict .items ():
165
165
nElement += 1
166
166
progress .setPercentage (int (nElement * 100 / nFeat ))
167
- for i in range (len (value )):
168
- tmpInGeom = value [i ]
169
-
170
- if i == 0 :
171
- tmpOutGeom = tmpInGeom
172
- else :
173
- try :
174
- tmpOutGeom = QgsGeometry (
175
- tmpOutGeom .combine (tmpInGeom ))
176
- except :
177
- raise GeoAlgorithmExecutionException (
178
- self .tr ('Geometry exception while dissolving' ))
167
+ try :
168
+ tmpOutGeom = QgsGeometry .unaryUnion (value )
169
+ except :
170
+ raise GeoAlgorithmExecutionException (
171
+ self .tr ('Geometry exception while dissolving' ))
179
172
outFeat .setGeometry (tmpOutGeom )
180
173
outFeat .setAttributes (attrDict [key ])
181
174
writer .addFeature (outFeat )
You can’t perform that action at this time.
0 commit comments