[GRASS-user] Negative raster values from i.landsat.dehaze

James Travers traversjames at yahoo.ie
Sat May 5 14:42:30 EDT 2012



Hi again,

I stripped the comments from the icnd file for the i.atcorr command, but still get the same error:

$ i.atcorr -r -a iimg=R3 icnd=icnd3.txt oimg=C3
ERROR: Raster map <dem_float> not found


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.  This allows i.atcorr to run but the resulting map has all zeros in the non-null areas:


$ r.mapcalc 'dem=80'
 100%
$ i.atcorr -r -a iimg=R3 ialt=dem icnd=icnd3.txt oimg=C3
 100%
$ r.univar C3
 100%
total null and non-null cells: 55444
total null cells: 17574

Of the non-null cells:
----------------------
n: 37870
minimum: 0
maximum: 0
range: 0
mean: 0
mean of absolute values: 0
standard deviation: 0
variance: 0
variation coefficient: -nan %
sum: 0


Any ideas what is wrong here or how I can get i.atcorr to run without a valid elevation map?

Thanks,
Jamie



________________________________
 From: James Travers <traversjames at yahoo.ie>
To: Hamish <hamish_b at yahoo.com>; Markus Neteler <neteler at osgeo.org> 
Cc: GRASS user list <grass-user at lists.osgeo.org> 
Sent: Friday, 4 May 2012, 12:16:45
Subject: Re: [GRASS-user] Negative raster values from i.landsat.dehaze
 



Hi Hamish & Markus,

Thanks for the quick replies.  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.  

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:

<--------- start of control file -----> 


I will try again later with them removed anyway.

Cheers,
Jamie


________________________________
 From: Hamish <hamish_b at yahoo.com>
To: James Travers <traversjames at yahoo.ie>; Markus Neteler <neteler at osgeo.org> 
Cc: GRASS user list <grass-user at lists.osgeo.org> 
Sent: Friday, 4 May 2012, 11:51:44
Subject: Re: [GRASS-user] Negative raster values from i.landsat.dehaze
 
James wrote:
> > Ok, I have done a bit more digging and found r.univar
> > for
 the stats problem - don't know how I missed that one!
MarkusN:
> glad you found it. If you see any potential to improve the
> documentation, please make suggestions.

historical footnote: I wrote r.univar(.c) because I didn't notice that
the earlier r.univar(.sh) existed until I was near done. I guess the
same thinness in the docs still exists. Happy mistake. ;-)

Markus:
> I just tried with the example of the manual page in the
> North Carolina sample dataset and it worked ok. But: don't
> put the comment lines into the control file! I fell into this
> trap in the beginning and i.atcorr
> offered weird error messages.
...
> I suspect that you have the two comment lines in the file
> which unfortunately confuse i.atcorr.

imagery/i.atcorr/GeomCond.cpp's GeomCond::parse():
    cin >> igeom;
   
 cin.ignore(numeric_limits<int>::max(),'\n');  /* read the rest of the scraps, like comments */
...

can a C++'er recommend ways to silently skip empty lines and lines
beginning with '#'?


thanks,
Hamish



_______________________________________________
grass-user mailing list
grass-user at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20120505/3c029e37/attachment.html


More information about the grass-user mailing list