[GRASS-SVN] r56579 - in grass/trunk/raster/r.watershed: ram seg

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jun 3 12:43:43 PDT 2013


Author: mmetz
Date: 2013-06-03 12:43:42 -0700 (Mon, 03 Jun 2013)
New Revision: 56579

Modified:
   grass/trunk/raster/r.watershed/ram/do_cum.c
   grass/trunk/raster/r.watershed/seg/do_cum.c
Log:
r.watershed: skip NULL cells for streams

Modified: grass/trunk/raster/r.watershed/ram/do_cum.c
===================================================================
--- grass/trunk/raster/r.watershed/ram/do_cum.c	2013-06-03 19:01:27 UTC (rev 56578)
+++ grass/trunk/raster/r.watershed/ram/do_cum.c	2013-06-03 19:43:42 UTC (rev 56579)
@@ -522,6 +522,7 @@
 			swale_cells++;
 		    valued = wat[nbr_index];
 		    ele_nbr = alt[nbr_index];
+		    edge = Rast_is_c_null_value(&ele_nbr);
 		    if ((ABS(valued) + 0.5) >= threshold  &&
 		        ele_nbr > ele)
 			stream_cells++;

Modified: grass/trunk/raster/r.watershed/seg/do_cum.c
===================================================================
--- grass/trunk/raster/r.watershed/seg/do_cum.c	2013-06-03 19:01:27 UTC (rev 56578)
+++ grass/trunk/raster/r.watershed/seg/do_cum.c	2013-06-03 19:43:42 UTC (rev 56579)
@@ -574,6 +574,7 @@
 
 		    /* check for swale or stream cells */
 		    is_swale = FLAG_GET(flag_nbr[ct_dir], SWALEFLAG);
+		    edge = FLAG_GET(flag_nbr[ct_dir], NULLFLAG);
 		    if (is_swale)
 			swale_cells++;
 		    if ((ABS(wat_nbr[ct_dir]) + 0.5) >= threshold &&



More information about the grass-commit mailing list