[GRASS-SVN] r44250 - grass/branches/develbranch_6/imagery/i.atcorr

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Nov 8 04:24:03 EST 2010


Author: martinl
Date: 2010-11-08 01:24:03 -0800 (Mon, 08 Nov 2010)
New Revision: 44250

Modified:
   grass/branches/develbranch_6/imagery/i.atcorr/6s.cpp
   grass/branches/develbranch_6/imagery/i.atcorr/main.cpp
Log:
i.atcorr: be less verbose, fix when elevation is not given


Modified: grass/branches/develbranch_6/imagery/i.atcorr/6s.cpp
===================================================================
--- grass/branches/develbranch_6/imagery/i.atcorr/6s.cpp	2010-11-08 07:34:00 UTC (rev 44249)
+++ grass/branches/develbranch_6/imagery/i.atcorr/6s.cpp	2010-11-08 09:24:03 UTC (rev 44250)
@@ -158,6 +158,9 @@
 {
     static const string head(" 6s version 4.2b ");
 
+    if (G_verbose() <= G_verbose_std())
+	return;
+    
     cout << endl << endl << endl;
     Output::Begin(); Output::Repeat(30,'*'); Output::Print(head); Output::Repeat(30,'*'); Output::End();
 

Modified: grass/branches/develbranch_6/imagery/i.atcorr/main.cpp
===================================================================
--- grass/branches/develbranch_6/imagery/i.atcorr/main.cpp	2010-11-08 07:34:00 UTC (rev 44249)
+++ grass/branches/develbranch_6/imagery/i.atcorr/main.cpp	2010-11-08 09:24:03 UTC (rev 44250)
@@ -296,7 +296,6 @@
     if(ialt_fd >= 0) alt = (FCELL*)G_allocate_raster_buf(FCELL_TYPE);
     if(ivis_fd >= 0) vis = (FCELL*)G_allocate_raster_buf(FCELL_TYPE);
 
-    G_verbose_message(_("Percent complete..."));
     nrows = G_window_rows();
     ncols = G_window_cols();
 
@@ -331,7 +330,8 @@
 	        G_set_f_null_value(&buf[col], 1);
 	        continue;
 	    }
-	    alt[col] /= 1000.0f; /* converting to km from input which should be in meter */
+	    if (ialt_fd >= 0)
+		alt[col] /= 1000.0f; /* converting to km from input which should be in meter */
 
             /* check if both maps are active and if whether any value has changed */
             if((ialt_fd >= 0) && (ivis_fd >= 0) && ((prev_vis != vis[col]) || (prev_alt != alt[col])))
@@ -407,7 +407,8 @@
 	if(oflt) G_put_raster_row(ofd, buf, FCELL_TYPE);
 	else write_fp_to_cell(ofd, buf);
     }
-
+    G_percent(1, 1, 1);
+    
     /* free allocated memory */
     G_free(buf);
     if(ialt_fd >= 0) G_free(alt);



More information about the grass-commit mailing list