I'm relatively new to GRASS. I'm running version 6.4.3 on a Windows 7 machine. I'm trying to process Landsat 5 imagery from multiple states, so I was hoping to approximately follow the workflow here: Is there a way to automate the preprocessing of LANDSAT data?

I have no problem running i.landsat.toar, but when I try to use i.atcorr I get errors:

When I start to type into the command console, usually I type the command, then a space, the enter and it opens the GUI window.

When I type i.atcorr, as soon as I press the space, this displays:

Traceback (most recent call last): File "C:\Program Files\GRASS GIS 6.4.3\etc\wxpython\gui_core\prompt.py", line 1133, in OnKeyPressed

self.cmdDesc = gtask.parse_interface(GetRealCmd(cmd)) File "C:\Program Files\GRASS GIS 6.4.3\etc\python\grass\script\task.py", line 470, in parse_interface

tree = etree.fromstring(get_interface_description(name)) File "C:\Program Files\GRASS GIS 6.4.3\etc\python\grass\script\task.py", line 448, in get_interface_description

"\n\nDetails: %(det)s") % { 'cmd' : cmd, 'det' : decode(cmderr) } grass.script.core . ScriptError : Unable to fetch interface description for command 'i.atcorr'. Details:

[Note that no details appear after it says "Details:"]

Then if I press "Enter", an error pops up with the same text:

"Unable to fetch interface description for command 'i.atcorr'. Details: "

I thought perhaps the problem was that I didn't actually have the function installed on my computer, so I went through g.extension and get this:

g.extension extension=i.atcorr svnurl=http://svn.osgeo.org/grass/grass-addons/grass6 which: wget: unknown command WARNING: The GRASS program path: [C:/Program Files/GRASS GIS 6.4.3] contains a space. The >build which follows will likely fail. Fetching from GRASS-Addons SVN (be patient)... svn: E170000: URL 'http://svn.osgeo.org/grass/grass- addons/grass6/imagery/i.atcorr' doesn't exist ERROR: GRASS Add-on i.atcorr not found in repository or no network connection or another >problem"

Google tells me that I'm not alone in this "contains a space" error, but I couldn't find any clear information on how to solve this or work around it.

Any insight or advice would be much appreciated. I am not sure if I can circumvent the problem by just using the command console, but as I looked through the wiki on the topic (http://grasswiki.osgeo.org/wiki/Atmospheric_correction) it wasn't clear to me if I was supposed to build my own icdn text file? That's not something that came when I downloaded the data from USGS. I was hoping the GUI version of the function would make this more clear to me but since I can't get it to open, I'm still confused.

Thanks in advance.

  • 2
    Whats the end game? Isn't toar enough? – Willy Nov 23 '13 at 10:29
  • 1
    Willy- as I understand it, for calculating indices across scenes collected on different dates (in some cases, different years to get cloud-free imagery) atmospheric correction is also necessary- atmospherically-corrected radiance values are described here as "the proper level of correction to calculate vegetation indices." grass.osgeo.org/grass64/manuals/imageryintro.html – Nan Nov 23 '13 at 16:09
  • You should not at all use g.extension here since i.atcorr is included in GRASS GIS 6.4.3. Perhaps your installation stumbles over the white space in your path to GRASS GIS? And yes, the control file you have to write yourself since it depends on your data. – markusN Nov 24 '13 at 10:50
  • @markusN- thanks for your input- do you have a suggestion about how to deal with the error in i.atcorr? Do I need to re-install GRASS with a different path? (Should I question why it would stumble over the default path that it named itself, or is that just a rabbit hole I don't want to go down?) – Nan Nov 25 '13 at 14:58
  • You might want to test a custom work-in-progress python script to loop i.atcorr over all bands that pertain to a Landsat scene (should work for Landsat5 TM as well): i.landsat.atcorr. – Nikos Alexandris Nov 29 '14 at 0:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.