Skip to content

Commit

Permalink
Fixed Split vector layer algorithm
Browse files Browse the repository at this point in the history
Previously it would leave all output files except for the first one empty
  • Loading branch information
wonder-sk committed Feb 20, 2015
1 parent aab3bfd commit efcbe2f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions python/plugins/processing/algs/qgis/VectorSplit.py
Expand Up @@ -67,13 +67,12 @@ def processAlgorithm(self, progress):
geomType = layer.wkbType()

total = 100.0 / len(uniqueValues)
features = vector.features(layer)

for count, i in enumerate(uniqueValues):
fName = u'{0}_{1}.shp'.format(baseName, unicode(i).strip())

writer = vector.VectorWriter(fName, None, fields, geomType, crs)
for f in features:
for f in vector.features(layer):
if f[fieldName] == i:
writer.addFeature(f)
del writer
Expand Down

0 comments on commit efcbe2f

Please sign in to comment.