Skip to content

Commit

Permalink
There is an indentation error in the Dissolve.py script that writes o…
Browse files Browse the repository at this point in the history
…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 authored and unknown committed Mar 12, 2014
1 parent cc9a487 commit ed5f778
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions python/plugins/processing/algs/ftools/Dissolve.py
Expand Up @@ -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)
Expand Down Expand Up @@ -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'
Expand Down

0 comments on commit ed5f778

Please sign in to comment.