[GRASS-SVN] r56987 - grass/trunk/raster/r.volume
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Jul 2 14:44:24 PDT 2013
Author: mmetz
Date: 2013-07-02 14:44:24 -0700 (Tue, 02 Jul 2013)
New Revision: 56987
Modified:
grass/trunk/raster/r.volume/main.c
Log:
r.volume; fix count
Modified: grass/trunk/raster/r.volume/main.c
===================================================================
--- grass/trunk/raster/r.volume/main.c 2013-07-02 21:33:18 UTC (rev 56986)
+++ grass/trunk/raster/r.volume/main.c 2013-07-02 21:44:24 UTC (rev 56987)
@@ -166,9 +166,10 @@
row, col, i, clumpmap, max);
if (i < 1)
continue; /* ignore zeros and negs */
+ if (Rast_is_d_null_value(&data_buf[col]))
+ continue;
+ sum[i] += data_buf[col];
count[i]++;
- if (!Rast_is_d_null_value(&data_buf[col]))
- sum[i] += data_buf[col];
}
}
G_percent(row, rows, 2);
More information about the grass-commit
mailing list