Skip to content

Commit

Permalink
Zonal statistics: changed variance names (variable and field name; CV…
Browse files Browse the repository at this point in the history
… > var)
  • Loading branch information
cayetanobv committed Sep 18, 2014
1 parent 5645a18 commit 8ec82a3
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 8ec82a3

Please sign in to comment.