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

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Apr 26 15:18:42 EDT 2011


Author: neteler
Date: 2011-04-26 12:18:42 -0700 (Tue, 26 Apr 2011)
New Revision: 46113

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 Rapideye sensors (r44358 with subsequent fixes)

Modified: grass/branches/releasebranch_6_4/imagery/i.atcorr/GeomCond.cpp
===================================================================
--- grass/branches/releasebranch_6_4/imagery/i.atcorr/GeomCond.cpp	2011-04-26 15:38:51 UTC (rev 46112)
+++ grass/branches/releasebranch_6_4/imagery/i.atcorr/GeomCond.cpp	2011-04-26 19:18:42 UTC (rev 46113)
@@ -366,6 +366,7 @@
     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. */
+    case 13: /* rapideye         * enter month,day,hh.ddd,long.,lat. */
     {
 	cin >> month;
 	cin >> jday;
@@ -411,7 +412,7 @@
 /* ---- print geometrical conditions ---- */
 void GeomCond::print()
 {
-    static const string etiq1[13] = {
+    static const string etiq1[14] = {
 	string(" user defined conditions     "),
 	string(" meteosat observation        "),
 	string(" goes east observation       "),
@@ -424,7 +425,8 @@
 	string(" liss     observation        "),
 	string(" aster    observation        "),
 	string(" avnir    observation        "),
-	string(" ikonos   observation        ")
+	string(" ikonos   observation        "),
+	string(" rapideye 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	2011-04-26 15:38:51 UTC (rev 46112)
+++ grass/branches/releasebranch_6_4/imagery/i.atcorr/GeomCond.h	2011-04-26 19:18:42 UTC (rev 46113)
@@ -53,7 +53,9 @@
 /*                                                                      c */
 /*         12      ikonos            * enter month,day,hh.ddd,long.,lat.c */
 /*                                                                      c */
+/*         13      rapideye          * 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	2011-04-26 15:38:51 UTC (rev 46112)
+++ grass/branches/releasebranch_6_4/imagery/i.atcorr/Iwave.cpp	2011-04-26 19:18:42 UTC (rev 46113)
@@ -2151,7 +2151,7 @@
 		.0029, .0023, .0018, .0020, .0023, .0018, .0013, .0011,
 		.0009, .0004, .0000
     };
-
+	
     static const float wli[3] = {0.350, 0.350, 0.350};
     static const float wls[3] = {1.035, 1.035, 1.035};
 
@@ -2172,6 +2172,100 @@
     }
 }
 
+/* Following filter function created using create_iwave.py */
+
+void IWave::rapideye(int iwa)
+{
+
+    /* "Blue" of rapideye */
+    static const float sr1[30] = {
+		.0200, .5050, .7300, .7450, .7600, .7750, .7800,
+		.8000, .8000, .8000, .8100, .8000, .8100, .8200,
+		.8300, .8400, .8500, .8650, .8800, .8900, .9200,
+		.9500, .9700, .9700, 1.0000, 1.0000
+    };
+
+    /* "Green" of rapideye */
+    static const float sr2[53] = {
+		.0100, .0183, .0267, .0105, .0132, .0158, .0184,
+		.0237, .0263, .0289, .0288, .0268, .0248, .0228,
+		.0188, .0168, .0148, .0128, .0108, .0200, .1200,
+		.8700, .8700, .8800, .8700, .8800, .8800, .8800,
+		.8900, .9000, .9000, .9050, .9200, .9250, .9300,
+		.9500, .9550, .9700, .9750, .9800, .9800, .9900,
+		.9900, .9850, 1.0000, .2750
+    };
+
+    /* "Red" of rapideye */
+    static const float sr3[27] = {
+		.0100, .0300, .2000, .7900, .8500, .8750, .8800,
+		.9000, .9100, .9100, .9200, .9300, .9450, .9500,
+		.9700, .9750, .9900, .9900, .9900, .9900, 1.0000,
+		.8600, .1150
+    };
+
+    /* "RedEdge " of rapideye */
+    static const float sr4[95] = {
+		.0300, .0285, .0271, .0256, .0241, .0226, .0212,
+		.0182, .0168, .0153, .0138, .0124, .0109, .0101,
+		.0108, .0111, .0114, .0118, .0121, .0124, .0128,
+		.0134, .0138, .0141, .0144, .0147, .0151, .0154,
+		.0161, .0164, .0167, .0170, .0174, .0177, .0180,
+		.0187, .0190, .0193, .0197, .0200, .0200, .0200,
+		.0200, .0200, .0200, .0200, .0200, .0200, .0200,
+		.0200, .0200, .0197, .0191, .0185, .0178, .0172,
+		.0159, .0153, .0146, .0140, .0133, .0127, .0121,
+		.0108, .0101, .0200, .1050, .4900, .9450, 1.0000,
+		1.0000, .9900, .9900, .9900, .9800, .9750, .9700,
+		.9600, .9450, .9400, .9000, .4300, .0950
+    };
+
+    /* "NIR " of rapideye */
+    static const float sr5[137] = {
+		.0100, .0102, .0103, .0105, .0106, .0108, .0110,
+		.0113, .0115, .0116, .0118, .0119, .0121, .0123,
+		.0126, .0128, .0129, .0131, .0132, .0134, .0136,
+		.0139, .0141, .0142, .0144, .0145, .0147, .0149,
+		.0152, .0154, .0155, .0157, .0158, .0160, .0162,
+		.0165, .0167, .0168, .0170, .0171, .0173, .0175,
+		.0178, .0180, .0181, .0183, .0184, .0186, .0188,
+		.0191, .0193, .0194, .0196, .0197, .0199, .0199,
+		.0192, .0188, .0185, .0182, .0178, .0175, .0171,
+		.0164, .0161, .0158, .0154, .0151, .0147, .0144,
+		.0137, .0134, .0130, .0127, .0123, .0120, .0116,
+		.0110, .0106, .0103, .0100, .0100, .0250, .0700,
+		.5000, .8850, 1.0000, .9750, .9700, .9750, .9800,
+		.9700, .9600, .9600, .9600, .9600, .9600, .9600,
+		.9500, .9400, .9400, .9300, .9300, .9300, .9300,
+		.9200, .9200, .9100, .9000, .8900, .8850, .8800,
+		.8600, .8400, .8400, .8150, .5800, .2450, .0800,
+
+    };
+
+    static const float wli[5] = {0.438, 0.463, 0.624, 0.500, 0.520};
+    static const float wls[5] = {0.513, 0.594, 0.690, 0.737, 0.862};
+
+    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 < 30; i++)  ffu.s[75+i] = sr1[i];
+        break;
+    case 2: for(i = 0; i < 53; i++)  ffu.s[85+i] = sr2[i];
+        break;
+    case 3: for(i = 0; i < 27; i++)  ffu.s[149+i] = sr3[i];
+        break;
+    case 4: for(i = 0; i < 95; i++)  ffu.s[100+i] = sr4[i];
+        break;
+    case 5: for(i = 0; i < 137; i++)  ffu.s[108+i] = sr5[i];
+        break;
+    }
+}
+
 float IWave::equivwl() const
 {
     float seb = 0;
@@ -2241,6 +2335,7 @@
 	else if(iwave <= 80)	aster(iwave - 71);
 	else if(iwave <= 84)    avnir(iwave - 80);
 	else if(iwave <= 87)    ikonos(iwave - 84);
+	else if(iwave <= 92)    rapideye(iwave - 87);
 	else G_warning(_("Unsupported iwave value: %d"), iwave);
     }
 
@@ -2257,7 +2352,7 @@
 /* --- spectral condition ---- */
 void IWave::print()
 {
-    static const string nsat[89] = {
+    static const string nsat[94] = {
 	string(" constant        "), string(" user s          "),
 	string(" meteosat        "), string(" goes east       "), string(" goes west       "),
 	string(" avhrr 1 (noaa6) "), string(" avhrr 2 (noaa6) "),
@@ -2293,8 +2388,10 @@
 	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(" ikonos green    "), string(" ikonos red      "),
-	string(" ikonos NIR      ")
+	string(" avnir 4         "),
+	string(" ikonos green    "), string(" ikonos red      "),	string(" ikonos NIR      "),
+	string(" rapideye blue   "), string(" rapideye green  "),	string(" rapideye red    "),
+	string(" rapideye rededge"), string(" rapideye NIR    "),
     };
 
 

Modified: grass/branches/releasebranch_6_4/imagery/i.atcorr/Iwave.h
===================================================================
--- grass/branches/releasebranch_6_4/imagery/i.atcorr/Iwave.h	2011-04-26 15:38:51 UTC (rev 46112)
+++ grass/branches/releasebranch_6_4/imagery/i.atcorr/Iwave.h	2011-04-26 19:18:42 UTC (rev 46113)
@@ -109,6 +109,11 @@
 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        88  Blue band of RapidEye  ( 0.438-0.513 )                  c
+c        89  Green      "               ( 0.463-0.594 )                  c
+c        90  Red      "               ( 0.624-0.690 )                  c
+c        91  RedEdge      "               ( 0.500-0.737 )                  c
+c        92  NIR      "               ( 0.520-0.862 )                  c
 c  note: wl has to be in micrometer                                    c
 c**********************************************************************/
 
@@ -147,6 +152,7 @@
 	void aster(int iwa);
 	void avnir(int iwa);
 	void ikonos(int iwa);
+	void rapideye(int iwa);
 
 
 public:

Modified: grass/branches/releasebranch_6_4/imagery/i.atcorr/description.html
===================================================================
--- grass/branches/releasebranch_6_4/imagery/i.atcorr/description.html	2011-04-26 15:38:51 UTC (rev 46112)
+++ grass/branches/releasebranch_6_4/imagery/i.atcorr/description.html	2011-04-26 19:18:42 UTC (rev 46113)
@@ -153,13 +153,19 @@
 <td>enter month,day,hh.ddd,long.,lat. *</td>
 </tr>
 
+<tr>
+<td>13</td>
+<td><b>RapidEye</b></td>
+<td>enter month,day,hh.ddd,long.,lat. *</td>
+</tr>
+
 </table>
 
 <blockquote>
 * <em>NOTE</em>: for HRV, TM, ETM+, LISS and ASTER experiments,
 longitude and latitude are the coordinates of the scene
-center. Latitude must be &gt;0 for northern hemisphere and &lt;0 for
-southern. Longitude must be &gt;0 for eastern hemisphere and &lt;0 for
+center. Latitude must be &gt; 0 for northern hemisphere and &lt; 0 for
+southern. Longitude must be &gt; 0 for eastern hemisphere and &lt; 0 for
 western.
 </blockquote>
 
@@ -351,7 +357,7 @@
 <h3>E. Target altitude (xps), sensor platform (xpp)</h3>
 
 Target altitude (xps, in negative [km]):
-<blockquote>xps &lt;= 0 means the target is at the sea level.
+<blockquote>xps &gt;= 0 means the target is at the sea level.
 <br>otherwise xps expresses the altitude of the target (e.g., mean elevation)
 in [km], given as negative value
 </blockquote>
@@ -532,6 +538,12 @@
 <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>
 
+<tr><td>88</td><td><b>RapidEye</b> Blue band (0.438-0.513)</td></tr>
+<tr><td>89</td><td>RapidEye Green band (0.463-0.594)</td></tr>
+<tr><td>90</td><td>RapidEye Red band (0.624-0.690)</td></tr>
+<tr><td>91</td><td>RapidEye RedEdge band (0.500-0.737)</td></tr>
+<tr><td>92</td><td>RapidEye NIR band (0.520-0.862)</td></tr>
+
 </table>
 
 <h2>EXAMPLES</h2>
@@ -571,20 +583,20 @@
 Convert DN (digital number = pixel values) to Radiance at top-of-atmosphere (TOA), using the
 formula
 <div class="code"><pre>
-   L&#955; = ((LMAX&#955; - LMIN&#955;)/(QCALMAX-QCALMIN)) * (QCAL-QCALMIN) + LMIN&#955;
+   L&lambda; = ((LMAX&lambda; - LMIN&lambda;)/(QCALMAX-QCALMIN)) * (QCAL-QCALMIN) + LMIN&lambda;
 </pre></div>
 Where:
 <ul>
-<li> L&#955; = Spectral Radiance at the sensor's aperture in Watt/(meter squared * ster * &#956;m), the
+<li> L&lambda; = Spectral Radiance at the sensor's aperture in Watt/(meter squared * ster * &micro;m), the
       apparent radiance as seen by the satellite sensor;</li>
 <li> QCAL = the quantized calibrated pixel value in DN;</li>
-<li> LMIN&#955; = the spectral radiance that is scaled to QCALMIN in watts/(meter squared * ster * &#956;m);</li>
-<li> LMAX&#955; = the spectral radiance that is scaled to QCALMAX in watts/(meter squared * ster * &#956;m);</li>
-<li> QCALMIN = the minimum quantized calibrated pixel value (corresponding to LMIN&#955;) in DN;</li>
-<li> QCALMAX = the maximum quantized calibrated pixel value (corresponding to LMAX&#955;) in DN=255.</li>
+<li> LMIN&lambda; = the spectral radiance that is scaled to QCALMIN in watts/(meter squared * ster * &micro;m);</li>
+<li> LMAX&lambda; = the spectral radiance that is scaled to QCALMAX in watts/(meter squared * ster * &micro;m);</li>
+<li> QCALMIN = the minimum quantized calibrated pixel value (corresponding to LMIN&lambda;) in DN;</li>
+<li> QCALMAX = the maximum quantized calibrated pixel value (corresponding to LMAX&lambda;) in DN=255.</li>
 </ul>
 
-LMIN&#955; and LMAX&#955; are the radiances related to the minimal and maximal DN value, and are reported
+LMIN&lambda; and LMAX&lambda; are the radiances related to the minimal and maximal DN value, and are reported
 in the metadata file for each image, or in the table 1. High gain or low gain is also reported
 in the metadata file of each Landsat image. The minimal DN value (QCALMIN) is 1 for Landsat ETM+
 images (see
@@ -678,8 +690,12 @@
 -->
 
 <li>Mauro A. Homem Antunes <a href="http://www.ltid.inpe.br/dsr/mauro/6s/download_6s.html">website about his 6S version</a>
+
+<li>RapidEye sensors have been provided by <a href="http://www.rapideye.de/">RapidEye AG, Germany</a>
+
 </ul>
 
+
 <h2>AUTHORS</h2>
 
 <p><em>Original version of the program for GRASS 5:</em>
@@ -697,6 +713,9 @@
 <p><em>AVNIR, IKONOS sensors addition 7/2010:</em>
 <br>Daniel Victoria, Anne Ghisla
 
+<p><em>RapidEye sensors addition 11/2010:</em>
+<br>Peter L&ouml;we, Anne Ghisla
+
 <p>
 <i>Last changed: $Date$</i>
 



More information about the grass-commit mailing list