[GRASS-SVN] r32972 - in grass-addons/gipe: i.longitude i.qc.modis

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Aug 21 09:50:39 EDT 2008


Author: ychemin
Date: 2008-08-21 09:50:39 -0400 (Thu, 21 Aug 2008)
New Revision: 32972

Modified:
   grass-addons/gipe/i.longitude/main.c
   grass-addons/gipe/i.qc.modis/main.c
   grass-addons/gipe/i.qc.modis/qc250a.c
   grass-addons/gipe/i.qc.modis/qc250b.c
   grass-addons/gipe/i.qc.modis/qc250c.c
   grass-addons/gipe/i.qc.modis/qc250d.c
   grass-addons/gipe/i.qc.modis/qc250e.c
   grass-addons/gipe/i.qc.modis/qc250f.c
   grass-addons/gipe/i.qc.modis/qc500a.c
   grass-addons/gipe/i.qc.modis/qc500c.c
   grass-addons/gipe/i.qc.modis/qc500d.c
   grass-addons/gipe/i.qc.modis/qc500e.c
Log:
code cleaning, upgrade, standardization

Modified: grass-addons/gipe/i.longitude/main.c
===================================================================
--- grass-addons/gipe/i.longitude/main.c	2008-08-21 13:38:06 UTC (rev 32971)
+++ grass-addons/gipe/i.longitude/main.c	2008-08-21 13:50:39 UTC (rev 32972)
@@ -127,8 +127,7 @@
 	{
 		DCELL d;
 		DCELL d_lon;
-		if(verbose)
-			G_percent(row,nrows,2);
+		G_percent(row,nrows,2);
 		if(G_get_raster_row(infd,inrast,row,data_type_inrast)<0)
 			G_fatal_error(_("Could not read from <%s>"),in);
 		for (col=0; col < ncols; col++)

Modified: grass-addons/gipe/i.qc.modis/main.c
===================================================================
--- grass-addons/gipe/i.qc.modis/main.c	2008-08-21 13:38:06 UTC (rev 32971)
+++ grass-addons/gipe/i.qc.modis/main.c	2008-08-21 13:50:39 UTC (rev 32972)
@@ -37,24 +37,24 @@
 
 int main(int argc, char *argv[])
 {
-	struct Cell_head cellhd; //region+header info
-	char *mapset; // mapset name
+	struct Cell_head cellhd; /*region+header info*/
+	char *mapset; /*mapset name*/
 	int nrows, ncols;
 	int row,col;
 
-	char *qcflag;// Switch for particular index
+	char *qcflag;/*Switch for particular index*/
 	
 	struct GModule *module;
 	struct Option *input1, *input2, *input_band, *output;
 	
 	struct Flag *flag1, *flag2;	
-	struct History history; //metadata
-	struct Colors colors; //Color rules	
+	struct History history; /*metadata*/
+	struct Colors colors; /*Color rules*/	
 	/************************************/
 	/* FMEO Declarations*****************/
-	char *name;   // input raster name
-	char *result; //output raster name
-	//File Descriptors
+	char *name;   /*input raster name*/
+	char *result; /*output raster name*/
+	/*File Descriptors*/
 	int infd;
 	int outfd;
 	
@@ -85,9 +85,7 @@
 	input1->answer     =_("modland_qa_bits");
 
 	input2 = G_define_standard_option(G_OPT_R_INPUT) ;
-	input2->key	   = _("input");
-	input2->description=_("Name of the surface reflectance QC map [bit array]");
-	input2->answer     =_("qcchan");
+	input2->description=_("Name of the surface reflectance QC layer [bit array]");
 
 	input_band 		= G_define_option();
 	input_band->key		= "band";
@@ -153,7 +151,6 @@
 		CELL qc500chan;
 
 		G_percent(row,nrows,2);
-//		printf("row = %i/%i\n",row,nrows);
 		if(G_get_raster_row(infd,inrast,row,data_type_qcchan)<0)
 			G_fatal_error(_("Could not read from <%s>"),qcchan);
 		/*process the data */

Modified: grass-addons/gipe/i.qc.modis/qc250a.c
===================================================================
--- grass-addons/gipe/i.qc.modis/qc250a.c	2008-08-21 13:38:06 UTC (rev 32971)
+++ grass-addons/gipe/i.qc.modis/qc250a.c	2008-08-21 13:50:39 UTC (rev 32972)
@@ -1,8 +1,9 @@
-// MODLAND QA Bits 250m Unsigned Int bits[0-1]
-// 00 -> class 1: Corrected product produced at ideal quality -- all bands
-// 01 -> class 2: Corrected product produced at less than idel quality -- some or all bands
-// 10 -> class 3: Corrected product NOT produced due to cloud effect -- all bands
-// 11 -> class 4: Corrected product NOT produced due to other reasons -- some or all bands mayb be fill value (Note that a value of [11] overrides a value of [01])
+/* MODLAND QA Bits 250m Unsigned Int bits[0-1]
+ * 00 -> class 1: Corrected product produced at ideal quality -- all bands
+ * 01 -> class 2: Corrected product produced at less than idel quality -- some or all bands
+ * 10 -> class 3: Corrected product NOT produced due to cloud effect -- all bands
+ * 11 -> class 4: Corrected product NOT produced due to other reasons -- some or all bands mayb be fill value (Note that a value of [11] overrides a value of [01])
+ */
 
 int qc250a( unsigned int pixel )
 {

Modified: grass-addons/gipe/i.qc.modis/qc250b.c
===================================================================
--- grass-addons/gipe/i.qc.modis/qc250b.c	2008-08-21 13:38:06 UTC (rev 32971)
+++ grass-addons/gipe/i.qc.modis/qc250b.c	2008-08-21 13:50:39 UTC (rev 32972)
@@ -1,8 +1,9 @@
-// Cloud State 250m Unsigned Int bits[2-3]
-// 00 -> class 1: Clear -- No clouds
-// 01 -> class 2: Cloudy
-// 10 -> class 3: Mixed
-// 11 -> class 4: Not Set ; Assumed Clear
+/* Cloud State 250m Unsigned Int bits[2-3]
+ * 00 -> class 1: Clear -- No clouds
+ * 01 -> class 2: Cloudy
+ * 10 -> class 3: Mixed
+ * 11 -> class 4: Not Set ; Assumed Clear
+ */
 
 int qc250b( unsigned int pixel )
 {

Modified: grass-addons/gipe/i.qc.modis/qc250c.c
===================================================================
--- grass-addons/gipe/i.qc.modis/qc250c.c	2008-08-21 13:38:06 UTC (rev 32971)
+++ grass-addons/gipe/i.qc.modis/qc250c.c	2008-08-21 13:50:39 UTC (rev 32972)
@@ -1,15 +1,16 @@
-// Band-wise Data Quality 250m Unsigned Int bits[0-1]
-// 0000 -> class 1: highest quality
-// 0111 -> class 2: noisy detector
-// 1000 -> class 3: dead detector; data interpolated in L1B
-// 1001 -> class 4: solar zenith >= 86 degrees
-// 1010 -> class 5: solar zenith >= 85 and < 86 degrees
-// 1011 -> class 6: missing input
-// 1100 -> class 7: internal constant used in place of climatological data for at least one atmospheric constant
-// 1101 -> class 8: correction out of bounds, pixel constrained to extreme allowable value
-// 1110 -> class 9: L1B data faulty
-// 1111 -> class 10: not processed due to deep ocean or cloud
-// Class 11: Combination of bits unused
+/* Band-wise Data Quality 250m Unsigned Int bits[0-1]
+ * 0000 -> class 1: highest quality
+ * 0111 -> class 2: noisy detector
+ * 1000 -> class 3: dead detector; data interpolated in L1B
+ * 1001 -> class 4: solar zenith >= 86 degrees
+ * 1010 -> class 5: solar zenith >= 85 and < 86 degrees
+ * 1011 -> class 6: missing input
+ * 1100 -> class 7: internal constant used in place of climatological data for at least one atmospheric constant
+ * 1101 -> class 8: correction out of bounds, pixel constrained to extreme allowable value
+ * 1110 -> class 9: L1B data faulty
+ * 1111 -> class 10: not processed due to deep ocean or cloud
+ * Class 11: Combination of bits unused
+ */
 
 int qc250c( unsigned int pixel , int bandno )
 {

Modified: grass-addons/gipe/i.qc.modis/qc250d.c
===================================================================
--- grass-addons/gipe/i.qc.modis/qc250d.c	2008-08-21 13:38:06 UTC (rev 32971)
+++ grass-addons/gipe/i.qc.modis/qc250d.c	2008-08-21 13:50:39 UTC (rev 32972)
@@ -1,6 +1,7 @@
-// Atmospheric correction 250m Unsigned Int bit[12]
-// 00 -> class 1: Not Corrected product
-// 01 -> class 2: Corrected product
+/* Atmospheric correction 250m Unsigned Int bit[12]
+ * 00 -> class 1: Not Corrected product
+ * 01 -> class 2: Corrected product
+ */
 
 int qc250d( unsigned int pixel )
 {

Modified: grass-addons/gipe/i.qc.modis/qc250e.c
===================================================================
--- grass-addons/gipe/i.qc.modis/qc250e.c	2008-08-21 13:38:06 UTC (rev 32971)
+++ grass-addons/gipe/i.qc.modis/qc250e.c	2008-08-21 13:50:39 UTC (rev 32972)
@@ -1,6 +1,7 @@
-// Adjacency correction 250m Unsigned Int bit[13]
-// 00 -> class 1: Not Corrected product
-// 01 -> class 2: Corrected product
+/* Adjacency correction 250m Unsigned Int bit[13]
+ * 00 -> class 1: Not Corrected product
+ * 01 -> class 2: Corrected product
+ */
 
 int qc250e( unsigned int pixel )
 {

Modified: grass-addons/gipe/i.qc.modis/qc250f.c
===================================================================
--- grass-addons/gipe/i.qc.modis/qc250f.c	2008-08-21 13:38:06 UTC (rev 32971)
+++ grass-addons/gipe/i.qc.modis/qc250f.c	2008-08-21 13:50:39 UTC (rev 32972)
@@ -1,6 +1,7 @@
-// Different orbit from 500m product, 250m Unsigned Int bit[14]
-// 00 -> class 1: same orbit as 500m
-// 01 -> class 2: different orbit from 500m
+/* Different orbit from 500m product, 250m Unsigned Int bit[14]
+ * 00 -> class 1: same orbit as 500m
+ * 01 -> class 2: different orbit from 500m
+ */
 
 int qc250f( unsigned int pixel )
 {

Modified: grass-addons/gipe/i.qc.modis/qc500a.c
===================================================================
--- grass-addons/gipe/i.qc.modis/qc500a.c	2008-08-21 13:38:06 UTC (rev 32971)
+++ grass-addons/gipe/i.qc.modis/qc500a.c	2008-08-21 13:50:39 UTC (rev 32972)
@@ -1,8 +1,9 @@
-// MODLAND QA Bits 500m long int bits[0-1]
-// 00 -> class 1: Corrected product produced at ideal quality -- all bands
-// 01 -> class 2: Corrected product produced at less than idel quality -- some or all bands
-// 10 -> class 3: Corrected product NOT produced due to cloud effect -- all bands
-// 11 -> class 4: Corrected product NOT produced due to other reasons -- some or all bands mayb be fill value (Note that a value of [11] overrides a value of [01])
+/* MODLAND QA Bits 500m long int bits[0-1]
+ * 00 -> class 1: Corrected product produced at ideal quality -- all bands
+ * 01 -> class 2: Corrected product produced at less than idel quality -- some or all bands
+ * 10 -> class 3: Corrected product NOT produced due to cloud effect -- all bands
+ * 11 -> class 4: Corrected product NOT produced due to other reasons -- some or all bands mayb be fill value (Note that a value of [11] overrides a value of [01])
+ */
 
 int qc500a( long int pixel )
 {

Modified: grass-addons/gipe/i.qc.modis/qc500c.c
===================================================================
--- grass-addons/gipe/i.qc.modis/qc500c.c	2008-08-21 13:38:06 UTC (rev 32971)
+++ grass-addons/gipe/i.qc.modis/qc500c.c	2008-08-21 13:50:39 UTC (rev 32972)
@@ -1,16 +1,17 @@
-// Band-wise Data Quality 500m long Int 
-// bits[2-5][6-9][10-13][14-17][18-21][22-25][26-29]
-// 0000 -> class 1: highest quality
-// 0111 -> class 2: noisy detector
-// 1000 -> class 3: dead detector; data interpolated in L1B
-// 1001 -> class 4: solar zenith >= 86 degrees
-// 1010 -> class 5: solar zenith >= 85 and < 86 degrees
-// 1011 -> class 6: missing input
-// 1100 -> class 7: internal constant used in place of climatological data for at least one atmospheric constant
-// 1101 -> class 8: correction out of bounds, pixel constrained to extreme allowable value
-// 1110 -> class 9: L1B data faulty
-// 1111 -> class 10: not processed due to deep ocean or cloud
-// Class 11: Combination of bits unused
+/* Band-wise Data Quality 500m long Int 
+ * bits[2-5][6-9][10-13][14-17][18-21][22-25][26-29]
+ * 0000 -> class 1: highest quality
+ * 0111 -> class 2: noisy detector
+ * 1000 -> class 3: dead detector; data interpolated in L1B
+ * 1001 -> class 4: solar zenith >= 86 degrees
+ * 1010 -> class 5: solar zenith >= 85 and < 86 degrees
+ * 1011 -> class 6: missing input
+ * 1100 -> class 7: internal constant used in place of climatological data for at least one atmospheric constant
+ * 1101 -> class 8: correction out of bounds, pixel constrained to extreme allowable value
+ * 1110 -> class 9: L1B data faulty
+ * 1111 -> class 10: not processed due to deep ocean or cloud
+ * Class 11: Combination of bits unused
+ */
 
 int qc500c( long int pixel , int bandno )
 {

Modified: grass-addons/gipe/i.qc.modis/qc500d.c
===================================================================
--- grass-addons/gipe/i.qc.modis/qc500d.c	2008-08-21 13:38:06 UTC (rev 32971)
+++ grass-addons/gipe/i.qc.modis/qc500d.c	2008-08-21 13:50:39 UTC (rev 32972)
@@ -1,6 +1,7 @@
-// Atmospheric correction 500m long Int bit[30]
-// 00 -> class 1: Not Corrected product
-// 01 -> class 2: Corrected product
+/* Atmospheric correction 500m long Int bit[30]
+ * 00 -> class 1: Not Corrected product
+ * 01 -> class 2: Corrected product
+ */
 
 int qc500d( long int pixel )
 {

Modified: grass-addons/gipe/i.qc.modis/qc500e.c
===================================================================
--- grass-addons/gipe/i.qc.modis/qc500e.c	2008-08-21 13:38:06 UTC (rev 32971)
+++ grass-addons/gipe/i.qc.modis/qc500e.c	2008-08-21 13:50:39 UTC (rev 32972)
@@ -1,6 +1,7 @@
-// Adjacency correction 500m long Int bit[31]
-// 00 -> class 1: Not Corrected product
-// 01 -> class 2: Corrected product
+/* Adjacency correction 500m long Int bit[31]
+ * 00 -> class 1: Not Corrected product
+ * 01 -> class 2: Corrected product
+ */
 
 int qc500e( long int pixel )
 {



More information about the grass-commit mailing list