[GRASS-SVN] r32239 - grass/trunk/raster/r.cost
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jul 23 20:56:49 EDT 2008
Author: glynn
Date: 2008-07-23 20:56:49 -0400 (Wed, 23 Jul 2008)
New Revision: 32239
Modified:
grass/trunk/raster/r.cost/main.c
Log:
Fix calculation of number of segments (round up instead of down)
Modified: grass/trunk/raster/r.cost/main.c
===================================================================
--- grass/trunk/raster/r.cost/main.c 2008-07-24 00:55:52 UTC (rev 32238)
+++ grass/trunk/raster/r.cost/main.c 2008-07-24 00:56:49 UTC (rev 32239)
@@ -339,7 +339,7 @@
srows = scols = SEGCOLSIZE;
if (maxmem > 0)
segments_in_memory =
- 2 + maxmem * (nrows / SEGCOLSIZE) * (ncols / SEGCOLSIZE) / 100;
+ 2 + maxmem * (1 + nrows / SEGCOLSIZE) * (1 + ncols / SEGCOLSIZE) / 100;
else
segments_in_memory = 4 * (nrows / SEGCOLSIZE + ncols / SEGCOLSIZE + 2);
More information about the grass-commit
mailing list