[GRASS-SVN] r44251 - grass/trunk/imagery/i.atcorr
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Nov 8 04:27:08 EST 2010
Author: martinl
Date: 2010-11-08 01:27:08 -0800 (Mon, 08 Nov 2010)
New Revision: 44251
Modified:
grass/trunk/imagery/i.atcorr/6s.cpp
grass/trunk/imagery/i.atcorr/main.cpp
Log:
i.atcorr: be less verbose, fix when elevation is not given
(merge r44250 from devbr6)
Modified: grass/trunk/imagery/i.atcorr/6s.cpp
===================================================================
--- grass/trunk/imagery/i.atcorr/6s.cpp 2010-11-08 09:24:03 UTC (rev 44250)
+++ grass/trunk/imagery/i.atcorr/6s.cpp 2010-11-08 09:27:08 UTC (rev 44251)
@@ -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/trunk/imagery/i.atcorr/main.cpp
===================================================================
--- grass/trunk/imagery/i.atcorr/main.cpp 2010-11-08 09:24:03 UTC (rev 44250)
+++ grass/trunk/imagery/i.atcorr/main.cpp 2010-11-08 09:27:08 UTC (rev 44251)
@@ -294,7 +294,6 @@
if(ialt_fd >= 0) alt = (FCELL*)Rast_allocate_buf(FCELL_TYPE);
if(ivis_fd >= 0) vis = (FCELL*)Rast_allocate_buf(FCELL_TYPE);
- G_verbose_message(_("Percent complete..."));
nrows = Rast_window_rows();
ncols = Rast_window_cols();
@@ -323,7 +322,8 @@
Rast_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])))
@@ -399,7 +399,8 @@
if(oflt) Rast_put_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