Jelajahi Sumber

Add an extra row and column to moving window to protect against rounding errors

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@33948 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 16 tahun lalu
induk
melakukan
1b5e01ce03
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      raster/r.resamp.stats/main.c

+ 2 - 2
raster/r.resamp.stats/main.c

@@ -315,8 +315,8 @@ int main(int argc, char *argv[])
 
     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 *));