Skip to content

Commit

Permalink
Merge pull request #1585 from cayetanobv/master
Browse files Browse the repository at this point in the history
[processing] fix column name in Zonal statistics alg
  • Loading branch information
alexbruy committed Sep 19, 2014
2 parents a809dcc + 8ec82a3 commit 9ae648b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/plugins/processing/algs/qgis/ZonalStatistics.py
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 9ae648b

Please sign in to comment.