<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div><br><span></span></div><div><span>Hi again,</span></div><div><br><span></span></div><div><span>I stripped the comments from the icnd file for the i.atcorr command, but still get the same error:</span></div><div><br><span></span></div><div><span>$ i.atcorr -r -a iimg=R3 icnd=icnd3.txt oimg=C3<br>ERROR: Raster map &lt;dem_float&gt; not found<br></span></div><div><br><span></span></div><div>I tried then to generate a DEM by just applying a fixed 80m value to a raster - I have no idea if this creates a valid elevation map, by the way.&nbsp; This allows i.atcorr to run but the resulting map has all zeros in the non-null areas:<br><span></span></div><div><span><br></span></div><div><span>$ r.mapcalc 'dem=80'<br>&nbsp;100%<br>$ i.atcorr -r -a iimg=R3 ialt=dem icnd=icnd3.txt oimg=C3<br>&nbsp;100%</span></div><div><span>$ r.univar
 C3<br>&nbsp;100%<br>total null and non-null cells: 55444<br>total null cells: 17574<br><br>Of the non-null cells:<br>----------------------<br>n: 37870<br>minimum: 0<br>maximum: 0<br>range: 0<br>mean: 0<br>mean of absolute values: 0<br>standard deviation: 0<br>variance: 0<br>variation coefficient: -nan %<br>sum: 0</span></div><div><br></div><div>Any ideas what is wrong here or how I can get i.atcorr to run without a valid elevation map?</div><div><br></div><div>Thanks,</div><div>Jamie<br></div><div><br></div>  <div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> James Travers &lt;traversjames@yahoo.ie&gt;<br> <b><span style="font-weight: bold;">To:</span></b> Hamish &lt;hamish_b@yahoo.com&gt;; Markus Neteler &lt;neteler@osgeo.org&gt;
 <br><b><span style="font-weight: bold;">Cc:</span></b> GRASS user list &lt;grass-user@lists.osgeo.org&gt; <br> <b><span style="font-weight: bold;">Sent:</span></b> Friday, 4 May 2012, 12:16:45<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [GRASS-user] Negative raster values from i.landsat.dehaze<br> </font> </div> <br><div id="yiv1023540721"><div><div style="color:#000;background-color:#fff;font-family:arial, helvetica, sans-serif;font-size:10pt;"><div><span><br></span></div><div><span>Hi Hamish &amp; Markus,</span></div><div><span><br></span></div><div><span>Thanks for the quick replies. &nbsp;I did have a look around the documentation for the functionality provided by r.univar, but I think the fact that I couldn't see it in any of the relevant examples put me off track. &nbsp;</span></div><div><span><br></span></div><div><span>The comment solution makes sense, and I don't think it is a file that needs extensive commenting, but coming
 from a UNIX background the hash marks screamed comment at me - maybe angle brackets would be a better choice in the documentation:</span></div><div><span><br></span></div><div><span>&lt;--------- start of control file -----&gt;&nbsp;<br></span></div><div><br></div><div>I will try again later with them removed
 anyway.</div><div><br></div><div>Cheers,</div><div>Jamie</div><div><br></div>  <div style="font-size:10pt;font-family:arial, helvetica, sans-serif;"> <div style="font-size:12pt;font-family:times, serif;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> Hamish &lt;hamish_b@yahoo.com&gt;<br> <b><span style="font-weight:bold;">To:</span></b> James Travers &lt;traversjames@yahoo.ie&gt;; Markus Neteler &lt;neteler@osgeo.org&gt; <br><b><span style="font-weight:bold;">Cc:</span></b> GRASS user list &lt;grass-user@lists.osgeo.org&gt; <br> <b><span style="font-weight:bold;">Sent:</span></b> Friday, 4 May 2012, 11:51:44<br> <b><span style="font-weight:bold;">Subject:</span></b> Re: [GRASS-user] Negative raster values from i.landsat.dehaze<br> </font> </div> <br>James wrote:<br>&gt; &gt; Ok, I have done a bit more digging and found r.univar<br>&gt; &gt; for
 the stats problem - don't know how I missed that one!<br>MarkusN:<br>&gt; glad you found it. If you see any potential to improve the<br>&gt; documentation, please make suggestions.<br><br>historical footnote: I wrote r.univar(.c) because I didn't notice that<br>the earlier r.univar(.sh) existed until I was near done. I guess the<br>same thinness in the docs still exists. Happy mistake. ;-)<br><br>Markus:<br>&gt; I just tried with the example of the manual page in the<br>&gt; North Carolina sample dataset and it worked ok. But: don't<br>&gt; put the comment lines into the control file! I fell into this<br>&gt; trap in the beginning and i.atcorr<br>&gt; offered weird error messages.<br>...<br>&gt; I suspect that you have the two comment lines in the file<br>&gt; which unfortunately confuse i.atcorr.<br><br>imagery/i.atcorr/GeomCond.cpp's GeomCond::parse():<br>&nbsp; &nbsp; cin &gt;&gt; igeom;<br>&nbsp; &nbsp;
 cin.ignore(numeric_limits&lt;int&gt;::max(),'\n');&nbsp; /* read the rest of the scraps, like comments */<br>...<br><br>can a C++'er recommend ways to silently skip empty lines and lines<br>beginning with '#'?<br><br><br>thanks,<br>Hamish<br><br><br> </div> </div>  </div></div></div><br>_______________________________________________<br>grass-user mailing list<br><a ymailto="mailto:grass-user@lists.osgeo.org" href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br><br><br> </div> </div>  </div></body></html>