[GRASS-SVN] r35973 - grass-addons/raster/r.univar2.zonal
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Feb 20 02:40:06 EST 2009
Author: mmetz
Date: 2009-02-20 02:40:06 -0500 (Fri, 20 Feb 2009)
New Revision: 35973
Modified:
grass-addons/raster/r.univar2.zonal/r.univar_main.c
grass-addons/raster/r.univar2.zonal/stats.c
Log:
zone numbers corrected
Modified: grass-addons/raster/r.univar2.zonal/r.univar_main.c
===================================================================
--- grass-addons/raster/r.univar2.zonal/r.univar_main.c 2009-02-20 07:38:46 UTC (rev 35972)
+++ grass-addons/raster/r.univar2.zonal/r.univar_main.c 2009-02-20 07:40:06 UTC (rev 35973)
@@ -290,7 +290,7 @@
continue;
}
- zone = *zptr + zone_info.min;
+ zone = *zptr - zone_info.min;
if (stats[zone].nextp) {
/* put the value into stats->XXXcell_array */
Modified: grass-addons/raster/r.univar2.zonal/stats.c
===================================================================
--- grass-addons/raster/r.univar2.zonal/stats.c 2009-02-20 07:38:46 UTC (rev 35972)
+++ grass-addons/raster/r.univar2.zonal/stats.c 2009-02-20 07:40:06 UTC (rev 35973)
@@ -116,7 +116,7 @@
sprintf(sum_str, "%.10f", stats[z].sum);
G_trim_decimal(sum_str);
- fprintf(stdout, "\nzone %d %s\n\n", z - zone_info.min, G_get_c_raster_cat(&z + zone_info.min, &(zone_info.cats)));
+ fprintf(stdout, "\nzone %d %s\n\n", z + zone_info.min, G_get_c_raster_cat(&z + zone_info.min, &(zone_info.cats)));
if (!param.shell_style->answer) {
fprintf(stdout, "total null and non-null cells: %d\n", stats[z].size);
More information about the grass-commit
mailing list