[GRASS-SVN] r34890 -
grass/branches/develbranch_6/raster/r.watershed/ram
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Dec 14 21:50:32 EST 2008
Author: hamish
Date: 2008-12-14 21:50:32 -0500 (Sun, 14 Dec 2008)
New Revision: 34890
Modified:
grass/branches/develbranch_6/raster/r.watershed/ram/init_vars.c
Log:
bugfix from Markus Metz (trac #398)
Modified: grass/branches/develbranch_6/raster/r.watershed/ram/init_vars.c
===================================================================
--- grass/branches/develbranch_6/raster/r.watershed/ram/init_vars.c 2008-12-15 01:28:14 UTC (rev 34889)
+++ grass/branches/develbranch_6/raster/r.watershed/ram/init_vars.c 2008-12-15 02:50:32 UTC (rev 34890)
@@ -139,11 +139,19 @@
G_fatal_error(_("unable to open elevation map layer"));
}
+ swale = flag_create(nrows, ncols);
+ in_list = flag_create(nrows, ncols);
+ worked = flag_create(nrows, ncols);
+
for (r = 0; r < nrows; r++) {
G_get_c_raster_row(fd, buf, r);
for (c = 0; c < ncols; c++) {
index = SEG_INDEX(alt_seg, r, c);
alt[index] = r_h[index] = buf[c];
+ /* all flags need to be manually set to zero */
+ flag_unset(swale, r, c);
+ flag_unset(in_list, r, c);
+ flag_unset(worked, r, c);
}
}
G_close_cell(fd);
@@ -186,7 +194,7 @@
}
G_close_cell(fd);
}
- swale = flag_create(nrows, ncols);
+
if (ob_flag) {
fd = G_open_cell_old(ob_name, ob_mapset);
if (fd < 0) {
@@ -207,8 +215,7 @@
G_fatal_error(_("unable to open rill map layer"));
}
}
- in_list = flag_create(nrows, ncols);
- worked = flag_create(nrows, ncols);
+
MASK_flag = 0;
do_points = nrows * ncols;
if (NULL != G_find_file("cell", "MASK", G_mapset())) {
More information about the grass-commit
mailing list