Selaa lähdekoodia

commented out printing a warning when tci is negative

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@33094 15284696-431f-4ddb-bdfa-cd5b030d7da7
Laura Toma 17 vuotta sitten
vanhempi
commit
c2ac2ccd64
1 muutettua tiedostoa jossa 6 lisäystä ja 4 poistoa
  1. 6 4
      raster/r.terraflow/sweep.cc

+ 6 - 4
raster/r.terraflow/sweep.cc

@@ -117,10 +117,12 @@ sweepOutput::compute(elevation_type elev,
 #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
   }