Skip to content

Commit ed5f778

Browse files
unknownunknown
unknown
authored and
unknown
committed
There is an indentation error in the Dissolve.py script that writes out the intermediate object on every merge with an input feature rather than just once at the end of the processing. This results in very large output file sizes.
I have also edited the defineCharacteristics function to allow the tool input to accept polyline features as well as polygons, in line with the fTools UI.
1 parent cc9a487 commit ed5f778

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

python/plugins/processing/algs/ftools/Dissolve.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ def processAlgorithm(self, progress):
8585
except:
8686
raise GeoAlgorithmExecutionException(
8787
'Geometry exception while dissolving')
88-
outFeat.setAttributes(attrs)
89-
writer.addFeature(outFeat)
88+
outFeat.setAttributes(attrs)
89+
writer.addFeature(outFeat)
9090
else:
9191
unique = vector.getUniqueValues(vlayerA, int(field))
9292
nFeat = nFeat * len(unique)
@@ -125,7 +125,8 @@ def defineCharacteristics(self):
125125
self.name = 'Dissolve'
126126
self.group = 'Vector geometry tools'
127127
self.addParameter(ParameterVector(Dissolve.INPUT, 'Input layer',
128-
[ParameterVector.VECTOR_TYPE_POLYGON]))
128+
[ParameterVector.VECTOR_TYPE_POLYGON,
129+
ParameterVector.VECTOR_TYPE_LINE]))
129130
self.addParameter(ParameterBoolean(Dissolve.DISSOLVE_ALL,
130131
'Dissolve all (do not use field)', True))
131132
self.addParameter(ParameterTableField(Dissolve.FIELD, 'Unique ID field'

0 commit comments

Comments
 (0)