[GRASS-SVN] r59899 - in grass/branches/releasebranch_7_0/raster/r.watershed: ram seg
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Apr 22 11:13:31 PDT 2014
Author: mmetz
Date: 2014-04-22 11:13:30 -0700 (Tue, 22 Apr 2014)
New Revision: 59899
Modified:
grass/branches/releasebranch_7_0/raster/r.watershed/ram/no_stream.c
grass/branches/releasebranch_7_0/raster/r.watershed/seg/no_stream.c
Log:
r.watershed: skip real depressions in basin extension
Modified: grass/branches/releasebranch_7_0/raster/r.watershed/ram/no_stream.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.watershed/ram/no_stream.c 2014-04-22 18:12:52 UTC (rev 59898)
+++ grass/branches/releasebranch_7_0/raster/r.watershed/ram/no_stream.c 2014-04-22 18:13:30 UTC (rev 59899)
@@ -15,6 +15,8 @@
for (r = row - 1, rr = 0; r <= row + 1; r++, rr++) {
for (c = col - 1, cc = 0; c <= col + 1; c++, cc++) {
if (r >= 0 && c >= 0 && r < nrows && c < ncols) {
+ if (r == row && c == col)
+ continue;
aspect = asp[SEG_INDEX(asp_seg, r, c)];
if (aspect == drain[rr][cc]) {
dvalue = wat[SEG_INDEX(wat_seg, r, c)];
Modified: grass/branches/releasebranch_7_0/raster/r.watershed/seg/no_stream.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.watershed/seg/no_stream.c 2014-04-22 18:12:52 UTC (rev 59898)
+++ grass/branches/releasebranch_7_0/raster/r.watershed/seg/no_stream.c 2014-04-22 18:13:30 UTC (rev 59899)
@@ -19,6 +19,8 @@
for (r = row - 1, rr = 0; r <= row + 1; r++, rr++) {
for (c = col - 1, cc = 0; c <= col + 1; c++, cc++) {
if (r >= 0 && c >= 0 && r < nrows && c < ncols) {
+ if (r == row && c == col)
+ continue;
seg_get(&aspflag, (char *)&af, r, c);
aspect = af.asp;
More information about the grass-commit
mailing list