[GRASS-SVN] r41095 - grass-addons/raster/r.univar2.zonal
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Feb 18 10:25:55 EST 2010
Author: mmetz
Date: 2010-02-18 10:25:55 -0500 (Thu, 18 Feb 2010)
New Revision: 41095
Modified:
grass-addons/raster/r.univar2.zonal/r3.univar_main.c
Log:
r3 bugfix
Modified: grass-addons/raster/r.univar2.zonal/r3.univar_main.c
===================================================================
--- grass-addons/raster/r.univar2.zonal/r3.univar_main.c 2010-02-18 15:11:22 UTC (rev 41094)
+++ grass-addons/raster/r.univar2.zonal/r3.univar_main.c 2010-02-18 15:25:55 UTC (rev 41095)
@@ -193,11 +193,12 @@
while (param.percentile->answers[i])
i++;
stats = create_univar_stat_struct(map_type, i);
- for (i = 0; i < stats->n_perc; i++) {
- sscanf(param.percentile->answers[i], "%i", &stats->perc[i]);
+ for (i = 0; i < zone_info.n_zones; i++) {
+ for (j = 0; j < stats[i].n_perc; j++) {
+ sscanf(param.percentile->answers[j], "%lf", &(stats[i].perc[j]));
+ }
}
- stats->n = 0;
for (z = 0; z < depths; z++) { /*From the bottom to the top */
if (!(param.shell_style->answer))
G_percent(z, depths - 1, 10);
More information about the grass-commit
mailing list