[GRASS-SVN] r42454 - grass-addons/raster/r.stream.extract
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Jun 3 07:20:21 EDT 2010
Author: mmetz
Date: 2010-06-03 07:20:21 -0400 (Thu, 03 Jun 2010)
New Revision: 42454
Modified:
grass-addons/raster/r.stream.extract/load.c
Log:
fix direction initialisation
Modified: grass-addons/raster/r.stream.extract/load.c
===================================================================
--- grass-addons/raster/r.stream.extract/load.c 2010-06-03 10:28:40 UTC (rev 42453)
+++ grass-addons/raster/r.stream.extract/load.c 2010-06-03 11:20:21 UTC (rev 42454)
@@ -86,6 +86,7 @@
loadp = ele;
accp = acc;
weightp = accweight;
+ aspp = asp;
G_debug(1, "start loading %d rows, %d cols", nrows, ncols);
for (r = 0; r < nrows; r++) {
@@ -174,6 +175,8 @@
loadp++;
accp++;
ptr = G_incr_void_ptr(ptr, ele_size);
+ *aspp = 0;
+ aspp++;
if (acc_fd >= 0)
acc_ptr = G_incr_void_ptr(acc_ptr, acc_size);
if (weight_fd >= 0) {
@@ -211,13 +214,11 @@
/* load edge cells to A* heap */
G_message(_("set edge points"));
loadp = ele;
- aspp = asp;
for (r = 0; r < nrows; r++) {
G_percent(r, nrows, 2);
for (c = 0; c < ncols; c++) {
- *aspp = 0;
is_worked = FLAG_GET(worked, r, c);
if (is_worked)
@@ -270,7 +271,6 @@
break;
}
}
- aspp++;
}
}
G_percent(nrows, nrows, 2); /* finish it */
More information about the grass-commit
mailing list