File tree 1 file changed +4
-5
lines changed
python/plugins/processing/algs/qgis/scripts
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 8
8
from processing .core .TableWriter import TableWriter
9
9
from collections import defaultdict
10
10
11
- layer = processing .getObject (input )
11
+ layer = processing .getObject (Input )
12
12
inputFields = layer .pendingFields ()
13
13
fieldIdxs = []
14
- fields = fields .split (',' )
14
+ fields = Fields .split (',' )
15
15
for f in fields :
16
16
idx = inputFields .indexFromName (f )
17
17
if idx == - 1 :
18
18
raise GeoAlgorithmExecutionException ('Field not found:' + f )
19
19
fieldIdxs .append (idx )
20
- writer = TableWriter (output , None , fields + ['FREQ' ])
20
+ writer = TableWriter (Output , None , fields + ['FREQ' ])
21
21
22
22
counts = {}
23
23
feats = processing .features (layer )
26
26
for i , feat in enumerate (feats ):
27
27
progress .setPercentage (int (100 * i / nFeats ))
28
28
attrs = feat .attributes ()
29
- clazz = tuple ([attrs [idx ] for idx in fieldIdxs ])
30
- print clazz
29
+ clazz = tuple ([attrs [idx ] for idx in fieldIdxs ])
31
30
counts [clazz ] += 1
32
31
33
32
for c in counts :
You can’t perform that action at this time.
0 commit comments