[GRASS-user] GRASS crashes while running i.atcorr
Nikos Alexandris
nik at nikosalexandris.net
Sun May 3 08:24:14 PDT 2015
* Nikos Alexandris <nik at nikosalexandris.net> [2015-05-02 11:38:23 +0300]:
> * Nikos Alexandris <nik at nikosalexandris.net> [2015-05-02 10:21:06 +0300]:
>
> >
> >
> >
> > * Jake Chila <jake.chila at gmail.com> [2015-05-01 11:33:01 -0300]:
> >
> > > hi all,
> > >
> > > So I am trying to run i.atcorr but every time I run it, the whole program
> > > goes unresponsive and crashes. Has anyone experienced this before? Is there
> > > any way I can fix it?
> > >
> > > One thing that might be causing it is my parameters text file. I'm not
> > > totally sure I understand what all the fields are but here is an example of
> > > the parameter files I have created. This one is for the second band of a
> > > landsat 5 TM scene over central British Columbia
> > >
> > > 7
> > > 8 15 18.49 -116.027755 50.267045
> > > 2
> > > 0
> > > 0
> > > 0
> > > -1000
> > > 26
> >
> > Hi Jake.
> >
> > Please have a close look in the manual. As well, here:
> > <http://grasswiki.osgeo.org/wiki/Atmospheric_correction#Atmospheric_correction>.
> >
> > If Landsat is your sensor to work with, here is a script around
> > i.atcorr: <https://github.com/NikosAlexandris/i.landsat.atcorr>. I
> > haven't used this in Windows though, and to upload it into grass-addons
> > I need to test it more.
>
> Unfortunately, something is broken currently and I have no time to check
> it :-(.
Jake, if you read Python, you could, however, make use of the Parameters python class
defined in
<https://github.com/NikosAlexandris/i.landsat.atcorr/blob/master/parameters.py>.
I will create a text file with the requested parameters suitable for i.atcorr.
An example inside python:
# import class
from parameters import Parameters
# check it out with help()
# help(Parameters)
# create object with desired six s parameters for i.atcorr
ssp = Parameters(geo=8,
mon=11, day=8, gmt='23:42',
lon=22.2, lat=33.3,
atm=2, aer=1, vis=10, aod=None,
xps=-200, xpp=-1000,
bnd=26)
# what is it like?
print ssp
Parameters for the 6S atmospheric correction model:
8 # Geometrical conditions
11 8 23.70 22.200000 33.300000 # Month Day GMT Center Longitude Latitude [DD]
2 # Atmospheric model [index]
1 # Aerosols model [index]
10.0 # Visibility [km]
-200.0 # Mean Target Altitude [negative km]
-1000 # Sensor Altitude rel. to xps [negative km] or SatelliteBorn [-1000]
26 # Satellite Band Number [index]
# export it to an ascii file
p6s.export_ascii("ssp_example.txt")
# what is inside the exported file?
cat p6s_example.txt
8 # Geometrical conditions
11 8 23.70 22.200000 33.300000 # Month Day GMT Center Longitude Latitude [DD]
2 # Atmospheric model [index]
1 # Aerosols model [index]
10.0 # Visibility [km]
-200.0 # Mean Target Altitude [negative km]
-1000 # Sensor Altitude rel. to xps [negative km] or SatelliteBorn [-1000]
26 # Satellite Band Number [index]
Nikos
More information about the grass-user
mailing list