[GRASS-SVN] r43506 - grass/branches/releasebranch_6_4/imagery/i.atcorr

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Sep 18 12:09:11 EDT 2010


Author: neteler
Date: 2010-09-18 16:09:11 +0000 (Sat, 18 Sep 2010)
New Revision: 43506

Modified:
   grass/branches/releasebranch_6_4/imagery/i.atcorr/GeomCond.cpp
   grass/branches/releasebranch_6_4/imagery/i.atcorr/GeomCond.h
   grass/branches/releasebranch_6_4/imagery/i.atcorr/Iwave.cpp
   grass/branches/releasebranch_6_4/imagery/i.atcorr/Iwave.h
   grass/branches/releasebranch_6_4/imagery/i.atcorr/description.html
Log:
backport of AVNIR and IKONOS sensors

Modified: grass/branches/releasebranch_6_4/imagery/i.atcorr/GeomCond.cpp
===================================================================
--- grass/branches/releasebranch_6_4/imagery/i.atcorr/GeomCond.cpp	2010-09-18 16:01:00 UTC (rev 43505)
+++ grass/branches/releasebranch_6_4/imagery/i.atcorr/GeomCond.cpp	2010-09-18 16:09:11 UTC (rev 43506)
@@ -363,7 +363,9 @@
     case 7: /* tm    ( landsat ) * enter month,day,hh.ddd,long.,lat. */
     case 8: /* etm+  ( landsat7) * enter month,day,hh.ddd,long.,lat. */
     case 9: /* liss  ( IRS 1C)   * enter month,day,hh.ddd,long.,lat. */
-     case 10: /* aster            * enter month,day,hh.ddd,long.,lat. */
+    case 10: /* aster            * enter month,day,hh.ddd,long.,lat. */
+    case 11: /* avnir            * enter month,day,hh.ddd,long.,lat. */
+    case 12: /* ikonos           * enter month,day,hh.ddd,long.,lat. */
     {
 	cin >> month;
 	cin >> jday;
@@ -409,7 +411,7 @@
 /* ---- print geometrical conditions ---- */
 void GeomCond::print()
 {
-    static const string etiq1[11] = {
+    static const string etiq1[13] = {
 	string(" user defined conditions     "),
 	string(" meteosat observation        "),
 	string(" goes east observation       "),
@@ -420,7 +422,9 @@
 	string(" t.m.     observation        "),
 	string(" etm+     observation        "),
 	string(" liss     observation        "),
-	string(" aster    observation        ")
+	string(" aster    observation        "),
+	string(" avnir    observation        "),
+	string(" ikonos   observation        ")
     };
 
     static const string head(" geometrical conditions identity  ");

Modified: grass/branches/releasebranch_6_4/imagery/i.atcorr/GeomCond.h
===================================================================
--- grass/branches/releasebranch_6_4/imagery/i.atcorr/GeomCond.h	2010-09-18 16:01:00 UTC (rev 43505)
+++ grass/branches/releasebranch_6_4/imagery/i.atcorr/GeomCond.h	2010-09-18 16:09:11 UTC (rev 43506)
@@ -49,7 +49,11 @@
 /*                                                                      c */
 /*         10      aster             * enter month,day,hh.ddd,long.,lat.c */
 /*                                                                      c */
+/*         11      avnir             * enter month,day,hh.ddd,long.,lat.c */
 /*                                                                      c */
+/*         12      ikonos            * enter month,day,hh.ddd,long.,lat.c */
+/*                                                                      c */
+/*                                                                      c */
 /*     note:       for hrv and tm experiments long. and lat. are the    c */
 /*                 coordinates of the scene center.                     c */
 /*                 lat. must be > 0 for north lat., < 0 for south lat.  c */

Modified: grass/branches/releasebranch_6_4/imagery/i.atcorr/Iwave.cpp
===================================================================
--- grass/branches/releasebranch_6_4/imagery/i.atcorr/Iwave.cpp	2010-09-18 16:01:00 UTC (rev 43505)
+++ grass/branches/releasebranch_6_4/imagery/i.atcorr/Iwave.cpp	2010-09-18 16:09:11 UTC (rev 43506)
@@ -1958,6 +1958,230 @@
     }
 }
 
+/* Following filter function created using create_iwave.py */
+
+void IWave::avnir(int iwa)
+{
+    /* "band 1" of AVNIR */
+    static const float sr1[64] = {
+		.0000, .0000, .0000, .0008, .0017, .0049, .0080,
+		.0293, .0776, .1260, .2609, .3958, .5315, .6672,
+		.7223, .7262, .7300, .7272, .7245, .7717, .8189,
+		.8815, .9068, .9322, .9496, .9669, .9708, .9747,
+		1.0000, .9849, .9699, .9507, .9316, .9365, .9415,
+		.9849, .9600, .9351, .7552, .5754, .3911, .2068,
+		.0655, .0440, .0226, .0150, .0075, .0046, .0018,
+		.0000, .0000, .0000, .0000, .0000, .0000, .0000
+    };
+
+    /* "band 2" of AVNIR */
+    static const float sr2[56] = {
+		.0000, .0000, .0000, .0008, .0015, .0030, .0045,
+		.0202, .0470, .0739, .1358, .1977, .3205, .4433,
+		.6832, .7137, .7442, .7594, .7746, .8089, .8432,
+		.8719, .8721, .8724, .8873, .9022, .9254, .9486,
+		.9764, .9882, 1.0000, .9904, .9808, .9349, .8890,
+		.7843, .7651, .7458, .7156, .6854, .5639, .4425,
+		.1586, .0985, .0384, .0236, .0088, .0053, .0017
+    };
+
+    /* "band 3" of AVNIR */
+    static const float sr3[80] = {
+		.0000, .0000, .0000, .0000, .0000, .0000, .0000,
+		.0016, .0025, .0034, .0043, .0051, .0075, .0099,
+		.0153, .0228, .0304, .0462, .0620, .0995, .1370,
+		.2844, .3857, .4871, .5747, .6624, .7198, .7771,
+		.8021, .7991, .7960, .7989, .8017, .8312, .8606,
+		.9359, .9592, .9825, .9912, 1.0000, .9931, .9862,
+		.9275, .9046, .8818, .8607, .8395, .8344, .8293,
+		.8136, .7470, .6804, .5481, .4158, .3100, .2043,
+		.0898, .0634, .0369, .0273, .0177, .0135, .0093,
+		.0060, .0045, .0030, .0023, .0015, .0016, .0016
+    };
+
+    /* "band 4" of AVNIR */
+    static const float sr4[120] = {
+		.0000, .0000, .0000, .0000, .0000, .0000, .0000,
+		.0023, .0023, .0022, .0033, .0045, .0080, .0115,
+		.0264, .0484, .0704, .1138, .1572, .2351, .3129,
+		.5733, .7244, .8754, .9377, 1.0000, .9884, .9768,
+		.9288, .9091, .8894, .8763, .8633, .8627, .8622,
+		.8885, .9136, .9388, .9437, .9486, .9531, .9576,
+		.9247, .8969, .8691, .8467, .8242, .7893, .7545,
+		.7117, .6911, .6705, .6560, .6414, .6357, .6299,
+		.6217, .6227, .6237, .6025, .5812, .5843, .5874,
+		.5860, .5696, .5532, .5251, .4969, .4438, .3908,
+		.2475, .1906, .1338, .1033, .0727, .0543, .0359,
+		.0224, .0161, .0097, .0069, .0040, .0038, .0036,
+		.0025, .0024, .0024, .0015, .0007, .0004, .0000,
+		.0007, .0006, .0006, .0006, .0006, .0003, .0000,
+		.0000, .0000, .0000, .0000, .0000, .0000, .0000
+    };
+
+    static const float wli[4] = {0.390, 0.485, 0.545, 0.700};
+    static const float wls[4] = {0.550, 0.625, 0.745, 1.000};
+
+    ffu.wlinf = (float)wli[iwa-1];
+    ffu.wlsup = (float)wls[iwa-1];
+
+    int i;
+    for(i = 0; i < 1501; i++) ffu.s[i] = 0;
+
+    switch(iwa)
+    {
+    case 1: for(i = 0; i < 64; i++)  ffu.s[56+i] = sr1[i];
+        break;
+    case 2: for(i = 0; i < 56; i++)  ffu.s[94+i] = sr2[i];
+        break;
+    case 3: for(i = 0; i < 80; i++)  ffu.s[118+i] = sr3[i];
+        break;
+    case 4: for(i = 0; i < 120; i++)  ffu.s[180+i] = sr4[i];
+        break;
+    }
+}
+
+/* Following filter function created using create_iwave.py */
+
+void IWave::ikonos(int iwa)
+{
+
+    /* "Ikonos Green" of ikonos */
+    static const float sr1[274] = {
+		.0008, .0011, .0015, .0012, .0009, .0008, .0007,
+		.0007, .0010, .0013, .0015, .0017, .0018, .0019,
+		.0028, .0040, .0052, .0064, .0077, .0082, .0088,
+		.0119, .0147, .0175, .0262, .0350, .0602, .0854,
+		.1929, .2617, .3305, .3750, .4195, .4638, .5082,
+		.6132, .6437, .6742, .6973, .7204, .7406, .7608,
+		.7601, .7742, .7883, .8225, .8566, .8730, .8894,
+		.9436, .9718, 1.0000, .9934, .9868, .9562, .9255,
+		.7613, .6519, .5424, .4282, .3139, .2590, .2041,
+		.1519, .1188, .0856, .0644, .0432, .0371, .0310,
+		.0266, .0244, .0222, .0221, .0221, .0242, .0262,
+		.0296, .0283, .0270, .0248, .0226, .0240, .0254,
+		.0305, .0289, .0274, .0243, .0213, .0215, .0217,
+		.0296, .0319, .0342, .0306, .0271, .0233, .0195,
+		.0195, .0193, .0190, .0165, .0140, .0107, .0073,
+		.0060, .0056, .0051, .0065, .0079, .0101, .0123,
+		.0200, .0210, .0221, .0214, .0208, .0199, .0190,
+		.0155, .0126, .0097, .0083, .0068, .0059, .0049,
+		.0054, .0085, .0115, .0169, .0222, .0231, .0240,
+		.0121, .0080, .0040, .0031, .0022, .0024, .0026,
+		.0023, .0029, .0035, .0030, .0025, .0024, .0023,
+		.0040, .0038, .0036, .0032, .0027, .0025, .0024,
+		.0026, .0024, .0022, .0019, .0016, .0016, .0016,
+		.0020, .0020, .0020, .0023, .0025, .0031, .0036,
+		.0056, .0061, .0066, .0071, .0075, .0078, .0080,
+		.0095, .0089, .0083, .0085, .0088, .0090, .0093,
+		.0107, .0116, .0125, .0128, .0131, .0131, .0131,
+		.0119, .0112, .0105, .0100, .0095, .0091, .0088,
+		.0084, .0083, .0082, .0081, .0080, .0082, .0084,
+		.0081, .0081, .0080, .0080, .0080, .0074, .0069,
+		.0054, .0051, .0048, .0046, .0045, .0043, .0041,
+		.0036, .0035, .0035, .0034, .0033, .0030, .0028,
+		.0028, .0026, .0024, .0024, .0023, .0025, .0026,
+		.0026, .0026, .0026, .0021, .0016, .0018, .0019,
+		.0024
+    };
+
+    /* "Ikonos Red" of ikonos */
+    static const float sr2[274] = {
+		.0006, .0007, .0008, .0008, .0007, .0008, .0008,
+		.0006, .0007, .0008, .0007, .0006, .0008, .0009,
+		.0006, .0010, .0013, .0013, .0012, .0019, .0027,
+		.0010, .0011, .0013, .0016, .0019, .0023, .0027,
+		.0034, .0037, .0040, .0049, .0057, .0074, .0091,
+		.0113, .0113, .0113, .0122, .0130, .0151, .0172,
+		.0245, .0306, .0367, .0435, .0503, .0565, .0628,
+		.1094, .1512, .1931, .2421, .2911, .3653, .4396,
+		.6507, .7286, .8066, .8391, .8717, .8801, .8884,
+		.8898, .8824, .8749, .8635, .8521, .8722, .8923,
+		.9977, .9819, .9661, .9369, .9077, .9005, .8932,
+		.9459, .9715, .9972, .9785, .9598, .9186, .8774,
+		.7497, .6259, .5020, .3926, .2832, .2215, .1599,
+		.1068, .0947, .0825, .0732, .0640, .0557, .0474,
+		.0320, .0273, .0227, .0196, .0166, .0155, .0145,
+		.0148, .0155, .0162, .0174, .0186, .0193, .0199,
+		.0188, .0170, .0152, .0138, .0125, .0122, .0119,
+		.0109, .0122, .0135, .0150, .0165, .0174, .0183,
+		.0159, .0135, .0112, .0088, .0063, .0059, .0055,
+		.0034, .0036, .0039, .0037, .0035, .0032, .0030,
+		.0031, .0027, .0023, .0029, .0034, .0035, .0036,
+		.0053, .0059, .0065, .0068, .0072, .0080, .0089,
+		.0095, .0088, .0080, .0075, .0070, .0067, .0064,
+		.0061, .0059, .0056, .0054, .0053, .0057, .0061,
+		.0074, .0070, .0067, .0067, .0067, .0081, .0094,
+		.0128, .0135, .0143, .0151, .0159, .0165, .0171,
+		.0172, .0168, .0163, .0158, .0152, .0143, .0134,
+		.0120, .0113, .0106, .0103, .0100, .0096, .0092,
+		.0098, .0093, .0089, .0087, .0084, .0081, .0078,
+		.0075, .0072, .0070, .0064, .0059, .0056, .0054,
+		.0046, .0043, .0039, .0038, .0036, .0034, .0033,
+		.0029, .0029, .0028, .0028, .0028, .0025, .0022,
+		.0025, .0024, .0022, .0024, .0025, .0023, .0021,
+		.0017, .0019, .0021, .0021, .0020, .0021, .0022,
+		.0014
+    };
+
+    /* "Ikonos NIR" of ikonos */
+    static const float sr3[274] = {
+		.0000, .0003, .0005, .0004, .0004, .0005, .0006,
+		.0003, .0006, .0008, .0007, .0007, .0005, .0004,
+		.0015, .0018, .0020, .0025, .0030, .0033, .0035,
+		.0040, .0041, .0041, .0060, .0078, .0081, .0084,
+		.0082, .0066, .0051, .0038, .0026, .0035, .0043,
+		.0055, .0055, .0055, .0042, .0029, .0023, .0017,
+		.0015, .0026, .0036, .0040, .0043, .0034, .0025,
+		.0020, .0017, .0013, .0014, .0015, .0015, .0015,
+		.0021, .0022, .0024, .0025, .0027, .0030, .0034,
+		.0029, .0029, .0029, .0035, .0041, .0050, .0060,
+		.0072, .0083, .0093, .0093, .0093, .0090, .0087,
+		.0095, .0099, .0103, .0118, .0133, .0169, .0204,
+		.0285, .0316, .0347, .0388, .0428, .0502, .0575,
+		.0855, .1052, .1249, .1506, .1764, .2174, .2584,
+		.4188, .5285, .6381, .7213, .8045, .8414, .8784,
+		.9196, .9364, .9532, .9545, .9559, .9424, .9289,
+		.9389, .9628, .9866, .9917, .9968, .9524, .9079,
+		.7698, .6808, .5919, .5067, .4215, .3634, .3053,
+		.2262, .1923, .1583, .1315, .1046, .0860, .0674,
+		.0447, .0373, .0299, .0269, .0239, .0230, .0220,
+		.0184, .0171, .0159, .0161, .0162, .0159, .0157,
+		.0165, .0168, .0171, .0167, .0163, .0142, .0121,
+		.0091, .0079, .0068, .0065, .0062, .0059, .0056,
+		.0042, .0042, .0042, .0046, .0050, .0045, .0040,
+		.0040, .0033, .0027, .0028, .0030, .0028, .0025,
+		.0033, .0029, .0026, .0026, .0026, .0027, .0028,
+		.0027, .0028, .0028, .0027, .0026, .0026, .0026,
+		.0025, .0024, .0024, .0024, .0023, .0026, .0029,
+		.0027, .0029, .0031, .0035, .0039, .0040, .0040,
+		.0040, .0037, .0035, .0031, .0026, .0024, .0022,
+		.0016, .0015, .0014, .0014, .0013, .0013, .0014,
+		.0011, .0011, .0012, .0012, .0012, .0011, .0010,
+		.0016, .0013, .0010, .0012, .0013, .0014, .0014,
+		.0029, .0023, .0018, .0020, .0023, .0018, .0013,
+		.0009
+    };
+
+    static const float wli[3] = {0.350, 0.350, 0.350};
+    static const float wls[3] = {1.035, 1.035, 1.035};
+
+    ffu.wlinf = (float)wli[iwa-1];
+    ffu.wlsup = (float)wls[iwa-1];
+
+    int i;
+    for(i = 0; i < 1501; i++) ffu.s[i] = 0;
+
+    switch(iwa)
+    {
+    case 1: for(i = 0; i < 274; i++)  ffu.s[40+i] = sr1[i];
+        break;
+    case 2: for(i = 0; i < 274; i++)  ffu.s[40+i] = sr2[i];
+        break;
+    case 3: for(i = 0; i < 274; i++)  ffu.s[40+i] = sr3[i];
+        break;
+    }
+}
+
 float IWave::equivwl() const
 {
     float seb = 0;
@@ -2025,6 +2249,8 @@
 	else if(iwave <= 67)	etmplus(iwave - 60);
 	else if(iwave <= 71)	irs_1c_liss(iwave - 67);
 	else if(iwave <= 80)	aster(iwave - 71);
+	else if(iwave <= 84)    avnir(iwave - 80);
+	else if(iwave <= 87)    ikonos(iwave - 84);
 	else G_warning(_("Unsupported iwave value: %d"), iwave);
     }
 
@@ -2041,7 +2267,7 @@
 /* --- spectral condition ---- */
 void IWave::print()
 {
-    static const string nsat[82] = {
+    static const string nsat[89] = {
 	string(" constant        "), string(" user s          "),
 	string(" meteosat        "), string(" goes east       "), string(" goes west       "),
 	string(" avhrr 1 (noaa6) "), string(" avhrr 2 (noaa6) "),
@@ -2075,7 +2301,10 @@
 	string(" liss 5          "),
 	string(" aster 1         "), string(" aster 2         "), string(" aster 3N        "),
 	string(" aster 4         "), string(" aster 5         "), string(" aster 6         "),
-	string(" aster 7         "), string(" aster 8         "), string(" aster 9         ")
+	string(" aster 7         "), string(" aster 8         "), string(" aster 9         "),
+	string(" avnir 1         "), string(" avnir 2         "), string(" avnir 3         "),
+	string(" avnir 4         "), string(" ikonos green    "), string(" ikonos red      "),
+	string(" ikonos NIR      ")
     };
 
 

Modified: grass/branches/releasebranch_6_4/imagery/i.atcorr/Iwave.h
===================================================================
--- grass/branches/releasebranch_6_4/imagery/i.atcorr/Iwave.h	2010-09-18 16:01:00 UTC (rev 43505)
+++ grass/branches/releasebranch_6_4/imagery/i.atcorr/Iwave.h	2010-09-18 16:09:11 UTC (rev 43506)
@@ -102,6 +102,13 @@
 c        78  7th      "               ( 2.200-2.393 )                  c
 c        79  8th      "               ( 2.248-2.475 )                  c
 c        80  9th      "               ( 2.295-2.538 )                  c
+c        81  1st band of avnir        ( 0.390-0.550 )                  c
+c        82  2nd      "               ( 0.485-0.695 )                  c
+c        83  3rd      "               ( 0.545-0.745 )                  c
+c        84  4th      "               ( 0.700-0.925 )                  c
+c        85  Green band of IKONOS     ( 0.350-1.035 )                  c
+c        86  Red      "               ( 0.350-1.035 )                  c
+c        87  NIR      "               ( 0.350-1.035 )                  c
 c  note: wl has to be in micrometer                                    c
 c**********************************************************************/
 
@@ -138,6 +145,8 @@
 	void etmplus(int iwa);
 	void irs_1c_liss(int iwa);
 	void aster(int iwa);
+	void avnir(int iwa);
+	void ikonos(int iwa);
 
 
 public:

Modified: grass/branches/releasebranch_6_4/imagery/i.atcorr/description.html
===================================================================
--- grass/branches/releasebranch_6_4/imagery/i.atcorr/description.html	2010-09-18 16:01:00 UTC (rev 43505)
+++ grass/branches/releasebranch_6_4/imagery/i.atcorr/description.html	2010-09-18 16:09:11 UTC (rev 43506)
@@ -139,6 +139,19 @@
 <td><b>aster</b></td>
 <td>enter month,day,hh.ddd,long.,lat. *</td>
 </tr>
+
+<tr>
+<td>11</td>
+<td><b>avnir</b></td>
+<td>enter month,day,hh.ddd,long.,lat. *</td>
+</tr>
+
+<tr>
+<td>12</td>
+<td><b>ikonos</b></td>
+<td>enter month,day,hh.ddd,long.,lat. *</td>
+</tr>
+
 </table>
 
 <blockquote>
@@ -505,6 +518,16 @@
 <tr><td>78</td><td>aster band 7 (2.200-2.393)</td></tr>
 <tr><td>79</td><td>aster band 8 (2.248-2.475)</td></tr>
 <tr><td>80</td><td>aster band 9 (2.295-2.538)</td></tr>
+
+<tr><td>81</td><td><b>avnir</b> band 1 (0.390-0.550)</td></tr>
+<tr><td>82</td><td>avnir band 2 (0.485-0.695)</td></tr>
+<tr><td>83</td><td>avnir band 3 (0.545-0.745)</td></tr>
+<tr><td>84</td><td>avnir band 4 (0.700-0.925)</td></tr>
+
+<tr><td>85</td><td><b>ikonos</b> Green band (0.350-1.035)</td></tr>
+<tr><td>86</td><td>ikonos Red band (0.350-1.035)</td></tr>
+<tr><td>87</td><td>ikonos NIR band (0.350-1.035)</td></tr>
+
 </table>
 
 <h2>EXAMPLES</h2>
@@ -575,6 +598,9 @@
 <p><em>ASTER sensor addition 7/2009:</em>
 <br>Michael Perdue, Canada
 
+<p><em>AVNIR, IKONOS sensors addition 7/2010:</em>
+<br>Daniel Victoria, Anne Ghisla
+
 <h2>REFERENCES</h2>
 
 <ul>



More information about the grass-commit mailing list