[GRASS-user] Model to python script

Andreas Ginau aginau at googlemail.com
Mon Sep 15 14:29:23 PDT 2014

Dear Grass community,
I have a mapset containing landsat channels 
B1,B2,B3,B4,B5,B6,B7,B8,B9,B10,B11 which are basically the result of the 
landsat_import script.

I want to load the mapset and run the following commands in order to 
perform i.landsat.toar, which does not work and returns exit code 1.
Graphical model works fine but when I export the model as a python 
script and run the script it also does not work.

grass.run_command("g.mapsets", mapset="LC81760382013119LGN01")
                       input_prefix = "B",
                       output_prefix = "test",
                       metfile = metfile,
                       sensor = "ot8",
                       method = "dos4")

How do I run i.landsat.toar on my mapset using python. My goal is to 
include the toar transformation into the landsat_import script.


More information about the grass-user mailing list