Skip to content

Commit efcbe2f

Browse files
committedFeb 20, 2015
Fixed Split vector layer algorithm
Previously it would leave all output files except for the first one empty
1 parent aab3bfd commit efcbe2f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed
 

‎python/plugins/processing/algs/qgis/VectorSplit.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,12 @@ def processAlgorithm(self, progress):
6767
geomType = layer.wkbType()
6868

6969
total = 100.0 / len(uniqueValues)
70-
features = vector.features(layer)
7170

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

7574
writer = vector.VectorWriter(fName, None, fields, geomType, crs)
76-
for f in features:
75+
for f in vector.features(layer):
7776
if f[fieldName] == i:
7877
writer.addFeature(f)
7978
del writer

0 commit comments

Comments
 (0)
Please sign in to comment.