Skip to content
Permalink
Browse files

There is an indentation error in the Dissolve.py script that writes o…

…ut 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.
  • Loading branch information
unknown unknown
unknown authored and unknown committed Mar 12, 2014
1 parent cc9a487 commit ed5f7781baf51f22405b0096f5dfbe2c469feef1
Showing with 4 additions and 3 deletions.
  1. +4 −3 python/plugins/processing/algs/ftools/Dissolve.py
@@ -85,8 +85,8 @@ def processAlgorithm(self, progress):
except:
raise GeoAlgorithmExecutionException(
'Geometry exception while dissolving')
outFeat.setAttributes(attrs)
writer.addFeature(outFeat)
outFeat.setAttributes(attrs)
writer.addFeature(outFeat)
else:
unique = vector.getUniqueValues(vlayerA, int(field))
nFeat = nFeat * len(unique)
@@ -125,7 +125,8 @@ def defineCharacteristics(self):
self.name = 'Dissolve'
self.group = 'Vector geometry tools'
self.addParameter(ParameterVector(Dissolve.INPUT, 'Input layer',
[ParameterVector.VECTOR_TYPE_POLYGON]))
[ParameterVector.VECTOR_TYPE_POLYGON,
ParameterVector.VECTOR_TYPE_LINE]))
self.addParameter(ParameterBoolean(Dissolve.DISSOLVE_ALL,
'Dissolve all (do not use field)', True))
self.addParameter(ParameterTableField(Dissolve.FIELD, 'Unique ID field'

0 comments on commit ed5f778

Please sign in to comment.
You can’t perform that action at this time.