Browse Source

r.watershed: fix correction for diagonal flow direction bias

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@67233 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 9 years ago
parent
commit
295c51c9fd
2 changed files with 2 additions and 2 deletions
  1. 1 1
      raster/r.watershed/ram/do_astar.c
  2. 1 1
      raster/r.watershed/seg/do_astar.c

+ 1 - 1
raster/r.watershed/ram/do_astar.c

@@ -134,7 +134,7 @@ int do_astar(void)
 				   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] <

+ 1 - 1
raster/r.watershed/seg/do_astar.c

@@ -87,7 +87,7 @@ int do_astar(void)
 				   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] <