[GRASS-SVN] r42884 - grass/trunk/imagery/i.atcorr

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Jul 23 10:14:47 EDT 2010


Author: aghisla
Date: 2010-07-23 14:14:46 +0000 (Fri, 23 Jul 2010)
New Revision: 42884

Modified:
   grass/trunk/imagery/i.atcorr/GeomCond.cpp
   grass/trunk/imagery/i.atcorr/GeomCond.h
   grass/trunk/imagery/i.atcorr/Iwave.cpp
   grass/trunk/imagery/i.atcorr/Iwave.h
   grass/trunk/imagery/i.atcorr/i.atcorr.html
Log:
Added IKONOS atmospherical correction

Modified: grass/trunk/imagery/i.atcorr/GeomCond.cpp
===================================================================
--- grass/trunk/imagery/i.atcorr/GeomCond.cpp	2010-07-23 10:51:05 UTC (rev 42883)
+++ grass/trunk/imagery/i.atcorr/GeomCond.cpp	2010-07-23 14:14:46 UTC (rev 42884)
@@ -365,6 +365,7 @@
     case 9: /* liss  ( IRS 1C)   * 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;
@@ -410,7 +411,7 @@
 /* ---- print geometrical conditions ---- */
 void GeomCond::print()
 {
-    static const string etiq1[12] = {
+    static const string etiq1[13] = {
 	string(" user defined conditions     "),
 	string(" meteosat observation        "),
 	string(" goes east observation       "),
@@ -422,7 +423,8 @@
 	string(" etm+     observation        "),
 	string(" liss     observation        "),
 	string(" aster    observation        "),
-	string(" avnir    observation        ")
+	string(" avnir    observation        "),
+	string(" ikonos   observation        ")
     };
 
     static const string head(" geometrical conditions identity  ");

Modified: grass/trunk/imagery/i.atcorr/GeomCond.h
===================================================================
--- grass/trunk/imagery/i.atcorr/GeomCond.h	2010-07-23 10:51:05 UTC (rev 42883)
+++ grass/trunk/imagery/i.atcorr/GeomCond.h	2010-07-23 14:14:46 UTC (rev 42884)
@@ -51,7 +51,9 @@
 /*                                                                      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/trunk/imagery/i.atcorr/Iwave.cpp
===================================================================
--- grass/trunk/imagery/i.atcorr/Iwave.cpp	2010-07-23 10:51:05 UTC (rev 42883)
+++ grass/trunk/imagery/i.atcorr/Iwave.cpp	2010-07-23 14:14:46 UTC (rev 42884)
@@ -2040,6 +2040,148 @@
     }
 }
 
+/* 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;
@@ -2108,6 +2250,7 @@
 	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);
     }
 
@@ -2124,7 +2267,7 @@
 /* --- spectral condition ---- */
 void IWave::print()
 {
-    static const string nsat[86] = {
+    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) "),
@@ -2160,7 +2303,8 @@
 	string(" aster 4         "), string(" aster 5         "), string(" aster 6         "),
 	string(" aster 7         "), string(" aster 8         "), string(" aster 9         "),
 	string(" avnir 1         "), string(" avnir 2         "), string(" avnir 3         "),
-	string(" avnir 4         ")
+	string(" avnir 4         "), string(" ikonos green    "), string(" ikonos red      "),
+	string(" ikonos NIR      ")
     };
 
 

Modified: grass/trunk/imagery/i.atcorr/Iwave.h
===================================================================
--- grass/trunk/imagery/i.atcorr/Iwave.h	2010-07-23 10:51:05 UTC (rev 42883)
+++ grass/trunk/imagery/i.atcorr/Iwave.h	2010-07-23 14:14:46 UTC (rev 42884)
@@ -106,6 +106,9 @@
 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**********************************************************************/
 
@@ -143,6 +146,7 @@
 	void irs_1c_liss(int iwa);
 	void aster(int iwa);
 	void avnir(int iwa);
+	void ikonos(int iwa);
 
 
 public:

Modified: grass/trunk/imagery/i.atcorr/i.atcorr.html
===================================================================
--- grass/trunk/imagery/i.atcorr/i.atcorr.html	2010-07-23 10:51:05 UTC (rev 42883)
+++ grass/trunk/imagery/i.atcorr/i.atcorr.html	2010-07-23 14:14:46 UTC (rev 42884)
@@ -146,6 +146,12 @@
 <td>enter month,day,hh.ddd,long.,lat. *</td>
 </tr>
 
+<tr>
+<td>11</td>
+<td><b>ikonos</b></td>
+<td>enter month,day,hh.ddd,long.,lat. *</td>
+</tr>
+
 </table>
 
 <blockquote>
@@ -518,6 +524,10 @@
 <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>



More information about the grass-commit mailing list