Skip to content
Browse files

Fixed Split vector layer algorithm

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 efcbe2f55b87808ee5a85659350036b5b9bb0811
Showing with 1 addition and 2 deletions.
  1. +1 −2 python/plugins/processing/algs/qgis/
@@ -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:
del writer

0 comments on commit efcbe2f

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