[GRASS-SVN] r67234 - in grass/branches/releasebranch_7_0/raster/r.watershed: ram seg

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Dec 18 13:05:10 PST 2015


Author: mmetz
Date: 2015-12-18 13:05:10 -0800 (Fri, 18 Dec 2015)
New Revision: 67234

Modified:
   grass/branches/releasebranch_7_0/raster/r.watershed/ram/do_astar.c
   grass/branches/releasebranch_7_0/raster/r.watershed/seg/do_astar.c
Log:
r.watershed: fix correction for diagonal flow direction bias

Modified: grass/branches/releasebranch_7_0/raster/r.watershed/ram/do_astar.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.watershed/ram/do_astar.c	2015-12-18 21:03:39 UTC (rev 67233)
+++ grass/branches/releasebranch_7_0/raster/r.watershed/ram/do_astar.c	2015-12-18 21:05:10 UTC (rev 67234)
@@ -134,7 +134,7 @@
 				   dist_to_nbr[ct_dir]);
 		}
 		if (!is_worked) {
-		    if (ct_dir > 3 && slope[ct_dir] > 0) {
+		    if (ct_dir > 3 && slope[ct_dir] >= 0) {
 			if (slope[nbr_ew[ct_dir]] >= 0) {
 			    /* slope to ew nbr > slope to center */
 			    if (slope[ct_dir] <

Modified: grass/branches/releasebranch_7_0/raster/r.watershed/seg/do_astar.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.watershed/seg/do_astar.c	2015-12-18 21:03:39 UTC (rev 67233)
+++ grass/branches/releasebranch_7_0/raster/r.watershed/seg/do_astar.c	2015-12-18 21:05:10 UTC (rev 67234)
@@ -87,7 +87,7 @@
 				   dist_to_nbr[ct_dir]);
 		}
 		if (!is_worked) {
-		    if (ct_dir > 3 && slope[ct_dir] > 0) {
+		    if (ct_dir > 3 && slope[ct_dir] >= 0) {
 			if (slope[nbr_ew[ct_dir]] >= 0) {
 			    /* slope to ew nbr > slope to center */
 			    if (slope[ct_dir] <



More information about the grass-commit mailing list