[GRASS-SVN] r33948 - grass/trunk/raster/r.resamp.stats
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Oct 21 07:20:21 EDT 2008
Author: glynn
Date: 2008-10-21 07:20:21 -0400 (Tue, 21 Oct 2008)
New Revision: 33948
Modified:
grass/trunk/raster/r.resamp.stats/main.c
Log:
Add an extra row and column to moving window to protect against rounding errors
Modified: grass/trunk/raster/r.resamp.stats/main.c
===================================================================
--- grass/trunk/raster/r.resamp.stats/main.c 2008-10-21 04:01:45 UTC (rev 33947)
+++ grass/trunk/raster/r.resamp.stats/main.c 2008-10-21 11:20:21 UTC (rev 33948)
@@ -315,8 +315,8 @@
G_set_window(&src_w);
- row_scale = 1 + ceil(dst_w.ns_res / src_w.ns_res);
- col_scale = 1 + ceil(dst_w.ew_res / src_w.ew_res);
+ row_scale = 2 + ceil(dst_w.ns_res / src_w.ns_res);
+ col_scale = 2 + ceil(dst_w.ew_res / src_w.ew_res);
/* allocate buffers for input rows */
bufs = G_malloc(row_scale * sizeof(DCELL *));
More information about the grass-commit
mailing list