OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
smeta_exploit.h
Go to the documentation of this file.
1 /*
2  * Name: smeta_exploit.h
3  *
4  * Purpose:
5  * Include file containing the function prototypes used in the exploitation of product
6  * metadata for purposes of calculating viewing and solar illumination angles. These
7  * functions operate on the SMETA data type defined in "smeta.h".
8  */
9 #ifndef _SMETA_EXPLOIT_H_
10 #define _SMETA_EXPLOIT_H_
11 
12 #include <time.h>
13 #include <limits.h>
14 #include "ias_odl.h" /* IAS_OBJ_DESC definition */
15 #include "smeta.h" /* Definition of SMETA structure */
16 
17 typedef struct META_FRAME
18 {
19  int band; /* Band number */
20  int nlines; /* Number of image lines */
21  int nsamps; /* Number of image samples */
22  int code; /* Projection code (1 = UTM or 6 = PS) */
23  int zone; /* Projection zone number */
24  double ul_x; /* Upper left corner X coordinate */
25  double ul_y; /* Upper left corner Y coordinate */
26  double pixsize; /* Pixel size in meters */
27 } META_FRAME;
28 
29 int smeta_read(
30  SMETA *smeta, /* Product metadata structure to load */
31  const char *smeta_filename); /* Input file name to read */
32 
34  SMETA *smeta, /* Product metadata structure to load */
35  IAS_OBJ_DESC *smeta_odl ); /* Product metadata ODL object */
36 
38  SMETA_SCENE_PROJ *projection, /* Projection structure to load */
39  IAS_OBJ_DESC *smeta_odl ); /* Product metadata ODL object */
40 
42  SMETA_BAND *band_smeta, /* Product metadata structure to load */
43  IAS_OBJ_DESC *smeta_odl ); /* Product metadata ODL object */
44 
45 /* variant for read_band_meta for L5TM and older */
47  SMETA_BAND_LS *band_smeta, /* Product metadata structure to load */
48  IAS_OBJ_DESC *smeta_odl ); /* Product metadata ODL object */
49 
51  SMETA_BAND *band_smeta ); /* Product metadata structure to load */
52 
53 /* variant for read_band_meta for L5TM and older */
55  SMETA *smeta, /* Product metatdata structure to load */
56  SMETA_BAND_LS *band_smeta ); /* Product metadata structure to load */
57 
59  char *root_filename, /* Output root file name */
60  short *sat_zn, /* Array of satellite zenith angles */
61  short *sat_az, /* Array of satellite azimuth angles */
62  short *sun_zn, /* Array of solar zenith angles */
63  short *sun_az, /* Array of solar azimuth angles */
64  META_FRAME *frame ); /* Output image frame information */
65 
66 int delta_date(
67  int date1[3], /* Base date year, month, day */
68  int date2[3] ); /* Final date year, month, day */
69 
70 #endif
int smeta_read_band_meta_ls(SMETA_BAND_LS *band_smeta, IAS_OBJ_DESC *smeta_odl)
int smeta_load_band_model(SMETA_BAND *band_smeta)
int smeta_read_band_meta(SMETA_BAND *band_smeta, IAS_OBJ_DESC *smeta_odl)
double ul_y
Definition: smeta_exploit.h:25
int smeta_read(SMETA *smeta, const char *smeta_filename)
Definition: smeta_exploit.c:22
int smeta_load_band_model_ls(SMETA *smeta, SMETA_BAND_LS *band_smeta)
double pixsize
Definition: smeta_exploit.h:26
int delta_date(int date1[3], int date2[3])
int meta_write_angfile(char *root_filename, short *sat_zn, short *sat_az, short *sun_zn, short *sun_az, META_FRAME *frame)
int smeta_read_file_header(SMETA *smeta, IAS_OBJ_DESC *smeta_odl)
Definition: smeta_exploit.c:81
int smeta_read_projection(SMETA_SCENE_PROJ *projection, IAS_OBJ_DESC *smeta_odl)
double ul_x
Definition: smeta_exploit.h:24
Definition: smeta.h:118