Skip to content
Permalink
Browse files

Merge pull request #1585 from cayetanobv/master

[processing] fix column name in Zonal statistics alg
  • Loading branch information
alexbruy committed Sep 19, 2014
2 parents a809dcc + 8ec82a3 commit 9ae648b8249903a3748941e7731911145de573d1
Showing with 3 additions and 3 deletions.
  1. +3 −3 python/plugins/processing/algs/qgis/ZonalStatistics.py
@@ -137,8 +137,8 @@ def processAlgorithm(self, progress):
columnPrefix + 'unique', 21, 6)
(idxRange, fields) = vector.findOrCreateField(layer, fields,
columnPrefix + 'range', 21, 6)
(idxCV, fields) = vector.findOrCreateField(layer, fields, columnPrefix
+ 'cv', 21, 6)
(idxVar, fields) = vector.findOrCreateField(layer, fields, columnPrefix
+ 'var', 21, 6)

# idxMedian, fields = ftools_utils.findOrCreateField(layer, fields,
# columnPrefix + "median", 21, 6)
@@ -222,7 +222,7 @@ def processAlgorithm(self, progress):
attrs.insert(idxStd, float(masked.std()))
attrs.insert(idxUnique, numpy.unique(masked.compressed()).size)
attrs.insert(idxRange, float(masked.max()) - float(masked.min()))
attrs.insert(idxCV, float(masked.var()))
attrs.insert(idxVar, float(masked.var()))
# attrs.insert(idxMedian, float(masked.median()))

outFeat.setAttributes(attrs)

0 comments on commit 9ae648b

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