[GRASS-SVN] r33094 - grass/trunk/raster/r.terraflow

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Aug 26 11:43:46 EDT 2008


Author: ltoma
Date: 2008-08-26 11:43:43 -0400 (Tue, 26 Aug 2008)
New Revision: 33094

Modified:
   grass/trunk/raster/r.terraflow/sweep.cc
Log:
commented out printing a warning when tci is negative

Modified: grass/trunk/raster/r.terraflow/sweep.cc
===================================================================
--- grass/trunk/raster/r.terraflow/sweep.cc	2008-08-26 13:44:02 UTC (rev 33093)
+++ grass/trunk/raster/r.terraflow/sweep.cc	2008-08-26 15:43:43 UTC (rev 33094)
@@ -117,10 +117,12 @@
 #ifdef OUTPUT_TCI
     correct_tci = log(flow.get()*weight.dx()*weight.dy()/weight.totalContour());
     /* assert(correct_tci > 0); //is this true? */
-    if (correct_tci < 0) {
-      fprintf(stderr, "warning: tci negative, [flow=%f,dx=%f,dy=%f,cont=%f]\n",
-	      flow.get(), weight.dx(), weight.dy(), weight.totalContour());
-    }
+    /* there is no need for this warning. tci can be negative if the flow is small. */
+    /* if (correct_tci < 0) {
+       fprintf(stderr, "warning: tci negative, [flow=%f,dx=%f,dy=%f,cont=%f]\n",
+       flow.get(), weight.dx(), weight.dy(), weight.totalContour());
+       }
+    */
     tci = (tci_type)correct_tci;
 #endif
   }



More information about the grass-commit mailing list