[GRASS-SVN] r52321 - grass/branches/develbranch_6/imagery/i.landsat.toar
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Jul 6 07:03:27 PDT 2012
Author: martinl
Date: 2012-07-06 07:03:27 -0700 (Fri, 06 Jul 2012)
New Revision: 52321
Modified:
grass/branches/develbranch_6/imagery/i.landsat.toar/description.html
grass/branches/develbranch_6/imagery/i.landsat.toar/landsat.c
grass/branches/develbranch_6/imagery/i.landsat.toar/landsat.h
grass/branches/develbranch_6/imagery/i.landsat.toar/main.c
Log:
ejtizado: i.landsat.toar: backport r52320 from add-ons
Modified: grass/branches/develbranch_6/imagery/i.landsat.toar/description.html
===================================================================
--- grass/branches/develbranch_6/imagery/i.landsat.toar/description.html 2012-07-06 11:25:28 UTC (rev 52320)
+++ grass/branches/develbranch_6/imagery/i.landsat.toar/description.html 2012-07-06 14:03:27 UTC (rev 52321)
@@ -199,9 +199,9 @@
<li>Moran M.S., R.D. Jackson, P.N. Slater and P.M. Teillet, 1992: Remote
Sensing of Environment, vol. 41.</li>
-
- <li>Song et al : Classification and Change Detection Using Landsat TM
- Data, 2001: When and How to Correct Atmospheric Effects? Remote Sensing
+
+ <li>Song et al, 2001: Classification and Change Detection Using Landsat TM
+ Data, When and How to Correct Atmospheric Effects? Remote Sensing
of Environment, vol. 75.</li>
</ul>
Modified: grass/branches/develbranch_6/imagery/i.landsat.toar/landsat.c
===================================================================
--- grass/branches/develbranch_6/imagery/i.landsat.toar/landsat.c 2012-07-06 11:25:28 UTC (rev 52320)
+++ grass/branches/develbranch_6/imagery/i.landsat.toar/landsat.c 2012-07-06 14:03:27 UTC (rev 52321)
@@ -49,8 +49,7 @@
#define abs(x) (((x)>0)?(x):(-x))
void lsat_bandctes(lsat_data * lsat, int i, char method,
- double percent, int dos, double sat_zenith,
- double rayleigh)
+ double percent, int dos, double rayleigh)
{
double pi_d2, sin_e, cos_v, rad_sun;
@@ -61,7 +60,7 @@
pi_d2 = (double)(PI * lsat->dist_es * lsat->dist_es);
sin_e = (double)(sin(D2R * lsat->sun_elev));
- cos_v = (double)(cos(D2R * sat_zenith));
+ cos_v = (double)(cos(D2R * (lsat->number < 4 ? 9.2 : 8.2)));
/** Global irradiance on the sensor.
Radiance to reflectance coefficient, only NO thermal bands.
Modified: grass/branches/develbranch_6/imagery/i.landsat.toar/landsat.h
===================================================================
--- grass/branches/develbranch_6/imagery/i.landsat.toar/landsat.h 2012-07-06 11:25:28 UTC (rev 52320)
+++ grass/branches/develbranch_6/imagery/i.landsat.toar/landsat.h 2012-07-06 14:03:27 UTC (rev 52321)
@@ -61,6 +61,6 @@
double lsat_rad2ref(double, band_data *);
double lsat_rad2temp(double, band_data *);
-void lsat_bandctes(lsat_data *, int, char, double, int, double, double);
+void lsat_bandctes(lsat_data *, int, char, double, int, double);
#endif
Modified: grass/branches/develbranch_6/imagery/i.landsat.toar/main.c
===================================================================
--- grass/branches/develbranch_6/imagery/i.landsat.toar/main.c 2012-07-06 11:25:28 UTC (rev 52320)
+++ grass/branches/develbranch_6/imagery/i.landsat.toar/main.c 2012-07-06 14:03:27 UTC (rev 52321)
@@ -41,7 +41,7 @@
RASTER_MAP_TYPE in_data_type;
struct Option *input_prefix, *output_prefix, *metfn, *sensor, *adate, *pdate, *elev,
- *bgain, *metho, *perc, *dark, *satz, *atmo;
+ *bgain, *metho, *perc, *dark, *atmo;
char *inputname, *met, *outputname, *sensorname;
struct Flag *msss, *frad, *l5_mtl;
@@ -49,8 +49,8 @@
char band_in[GNAME_MAX], band_out[GNAME_MAX];
int i, j, q, method, pixel, dn_dark[MAX_BANDS], dn_mode[MAX_BANDS];
int overwrite;
- double qcal, rad, ref, percent, ref_mode, sat_zenith, rayleigh;
-
+ double qcal, rad, ref, percent, ref_mode, rayleigh;
+
struct Colors colors;
struct FPRange range;
double min, max;
@@ -164,14 +164,6 @@
dark->answer = "1000";
dark->guisection = _("Settings");
- satz = G_define_option();
- satz->key = "sat_zenith";
- satz->type = TYPE_DOUBLE;
- satz->required = NO;
- satz->description = _("Satellite zenith in degrees");
- satz->answer = "8.2000";
- satz->guisection = _("Settings");
-
atmo = G_define_option();
atmo->key = "rayleigh";
atmo->type = TYPE_DOUBLE;
@@ -236,7 +228,6 @@
lsat.sun_elev = elev->answer == NULL ? 0. : atof(elev->answer);
percent = atof(perc->answer);
pixel = atoi(dark->answer);
- sat_zenith = atof(satz->answer);
rayleigh = atof(atmo->answer);
/* Data from MET file: only Landsat-7 ETM+ and Landsat-5 TM */
@@ -408,8 +399,7 @@
G_close_cell(infd);
}
/* Calculate transformation constants */
- lsat_bandctes(&lsat, i, method, percent, dn_dark[i], sat_zenith,
- rayleigh);
+ lsat_bandctes(&lsat, i, method, percent, dn_dark[i], rayleigh);
}
if (strlen(lsat.creation) == 0)
More information about the grass-commit
mailing list