[GRASS-SVN] r72257 - grass-addons/grass7/raster/r.vect.stats
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Feb 20 12:51:54 PST 2018
Author: wenzeslaus
Date: 2018-02-20 12:51:54 -0800 (Tue, 20 Feb 2018)
New Revision: 72257
Modified:
grass-addons/grass7/raster/r.vect.stats/r.vect.stats.py
Log:
r.vect.stats: always use user-specified method
i.e. use method also for z (as supported by r.in.xyz)
and use r.in.xyz definition of the method option
Modified: grass-addons/grass7/raster/r.vect.stats/r.vect.stats.py
===================================================================
--- grass-addons/grass7/raster/r.vect.stats/r.vect.stats.py 2018-02-19 19:55:06 UTC (rev 72256)
+++ grass-addons/grass7/raster/r.vect.stats/r.vect.stats.py 2018-02-20 20:51:54 UTC (rev 72257)
@@ -30,8 +30,12 @@
#%end
#%option
#% key: method
-#% description: Statistic to use for attribute column
-#% options: min,max,range,sum,mean,stddev,variance,coeff_var,median,percentile,skewness,trimmean
+#% type: string
+#% required: no
+#% multiple: no
+#% options: n,min,max,range,sum,mean,stddev,variance,coeff_var,median,percentile,skewness,trimmean
+#% description: Statistic to use for raster values
+#% descriptions: n;Number of points in cell;min;Minimum value of point values in cell;max;Maximum value of point values in cell;range;Range of point values in cell;sum;Sum of point values in cell;mean;Mean (average) value of point values in cell;stddev;Standard deviation of point values in cell;variance;Variance of point values in cell;coeff_var;Coefficient of variance of point values in cell;median;Median value of point values in cell;percentile;Pth (nth) percentile of point values in cell;skewness;Skewness of point values in cell;trimmean;Trimmed mean of point values in cell
#% answer: mean
#% guisection: Attributes
#%end
@@ -47,7 +51,7 @@
vector = options['input']
layer = 1
raster = options['output']
- method = 'n'
+ method = options['method']
z = 3
sep = 'pipe'
out_args = {}
@@ -56,7 +60,6 @@
gs.fatal('Vector map <{0}> not found'.format(vector))
if options['column']:
- method = options['method']
z = 4
out_args['column'] = options['column']
out_args['where'] = '{0} IS NOT NULL'.format(options['column'])
More information about the grass-commit
mailing list