|
ocssw
1.0
|
#include <stdint.h>#include <stdio.h>#include <math.h>#include <string.h>#include <fcntl.h>#include <unistd.h>#include <sys/stat.h>#include "path.h"#include "proto.h"#include "proj_proto.h"#include "mfhdf.h"Go to the source code of this file.
Classes | |
| struct | OUTPUT |
| struct | PROCESSINFO |
| struct | INPUT |
| struct | SDS |
Defines | |
| #define | DBL_MAX 1.7976931348623157E+308 /* max decimal value of a "double"*/ |
| #define | DEFPROJECTION HAMMER /* Default output projection */ |
| #define | FAST FALSE |
| #define | ATMCOR TRUE /* Do atmospheric correction */ |
| #define | UPDATE TRUE |
| #define | TILTSCANS FALSE |
| #define | MAXMEMDEF 500 /* Maximum memory to allocate (in Mbytes) */ |
| #define | STEP 1 |
| #define | DEFPIXSZ 10000. /* Pixel size (in m) for output image files (if compatible) */ |
| #define | UNDEF -999. /* Undefined value */ |
| #define | FILL_UINT8 255 /* Fill value */ |
| #define | FILL_INT16 -32767 /* Fill value */ |
| #define | MINREFL 0.00 /* Minimum reflectance allowed for min. blue compositing */ |
| #define | MAXSENZDEF 55. /* Maximum view angle */ |
| #define | UMASK 002 /* Set permission for created files */ |
| #define | BLUEBAND BAND2 /* Blue band for minimum blue compositing */ |
| #define | WATER_VAL -16384 /* Water (non-land) pixel value */ |
| #define | WAVELENGTH { "412", "443", "490", "510", "555", "670", "765", "865"} /* Band wavelength */ |
| #define | IRRAD {171.07, 189.91, 194.33, 188.24, 185.93, 152.14, 123.55, 100.00} /* TOA solar irradiance */ |
| #define | TAURAY {0.3139, 0.2341, 0.1561, 0.1324, 0.0942, 0.0439, 0.0257, 0.0155} /* TOA molecular reflectance */ |
| #define | OZONE {.00103, .00400, .02536, .04200, .09338, .04685, .00837, .00485} /* Coef. for ozone absorption */ |
| #define | WVAPOR {0.0000, 0.0000, 0.0000, 0.0000, 0.0008, 0.0043, 0.0007, 0.0057} /* Coef. for water vapor abs. */ |
| #define | OXYGEN {0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000} /* Coef. for oxygen absorption */ |
| #define | UOZ 0.270 /* Ozone abundance (cm.atm) */ |
| #define | PSURF 1013. /* Sea surface pressure */ |
| #define | NLPSURF 2160 /* Number of rows in surface pressure file */ |
| #define | NPPSURF 4320 /* Number of columns in surface pressure file */ |
| #define | TWO_THIRDS 0.666666666666666666667 |
| #define | FOUR_THIRDS 1.333333333333333333333 |
| #define | TWO_PI 6.28318530717958647692 |
| #define | RAD2DEG 57.29577951308232087684 /* 180.0 / M_PI */ |
| #define | NpixelsLAC 1285 |
| #define | OMF2 0.99330562 /* (1.0 - F) * (1.0 - F) */ |
| #define | R 6371007.181 /* Earth radius (m) */ |
| #define | MAXLENGTH 100 |
| #define | EPSILON 1e-6 |
| #define | N_CONVOL 7 |
| #define | CONVOL_MAX 30.0 |
| #define | CROSS_PRODUCT(x1, y1, x2, y2, x3, y3) ( ((x2) - (x1)) * ((y3) - (y1)) - ((y2) - (y1)) * ((x3) - (x1)) ) |
| #define | VERSION "1.1" |
| #define | IFOV 0.0015835 /* Instantaneous FOV (rad) */ |
| #define | L2FIELDS (2 * NBANDS + 9) |
Enumerations | |
| enum | { PLATECARREE, SINUSOIDAL, MOLLWEIDE, ROBINSON, HAMMER, NUMBEROFPROJECTIONS } |
| enum | { MINBLUE, MAXNDVI, MINSENZ, LASTIN } |
| enum | { GLOBAL, USERBOX } |
| enum | { BAND1, BAND2, BAND3, BAND4, BAND5, BAND6, BAND7, BAND8, NBANDS } |
| enum | { L1A, L2 } |
Functions | |
| int | alloc_new_array (void **data, int size, int32 num_type, int maxmem) |
| void | check_process_parameters (PROCESSINFO *process, char **wl) |
| int | get_geolocation_scan (int iscan, INPUT *input, PROCESSINFO process) |
| int | get_lonlat (double xproj, double yproj, double *lon, double *lat, int projtype, double lon_center) |
| int | get_xyproj (double lon, double lat, double *xproj, double *yproj, int projtype, double lon_center) |
| void | init_output_file (OUTPUT *proj, INPUT input, PROCESSINFO process) |
| void | init_output_projection (OUTPUT *proj, PROCESSINFO process) |
| void | memcpy_block (int offset2, int offset1, int Nrows, int Ncols, OUTPUT *proj) |
| void | parse_command_line (int argc, char **argv, OUTPUT *proj, PROCESSINFO *process) |
| void | process_pixel (int ipix, int iline_out, int ipix_out, char **wl, INPUT input, OUTPUT *proj, PROCESSINFO process) |
| int | project_scan (int iscan, char **wl, INPUT *input, OUTPUT *proj, PROCESSINFO process) |
| int | read_file_block (char *filename, char **wl, int offset, int startline, int buflines, OUTPUT *proj) |
| int | read_l2 (int iscan, INPUT *input, char **wl) |
| void | resample_geo_scan (int Npixels, float *inlon, float *inlat, double *outlon, double *outlat) |
| void | set_buffer_parameters (OUTPUT *proj, PROCESSINFO *process) |
| void | set_proj_parameters (OUTPUT *proj) |
| int | update_file (char *filename, char **wl, int offset, int startline, int buflines, OUTPUT *proj, char verbose, char gzip) |
| void | update_pixel (INPUT input, int16 ndvi, int ipix, int idx_out, int ifno, OUTPUT *proj) |
| void | write_cmd_line (int32 sd_id, char *cmd_line) |
| int16 | EVI (float blue, float red, float nir) |
| int16 | NDVI (float red, float nir) |
| int16 | GEMI (float red, float nir) |
| int16 | SMOKE (float **rho, int ipix) |
| unsigned char | read_mask (double lon, double lat, int16 close) |
| int | main (int argc, char **argv) |
Variables | |
| float64 | sf_refl = 0.0001 |
| float64 | sf_angle = 0.01 |
| float64 | sf_smoke = 0.0001 |
| float64 | sf_vi = 0.0001 |
Definition at line 50 of file make_L3_v1.1.c.
Definition at line 62 of file make_L3_v1.1.c.
| #define CONVOL_MAX 30.0 |
Definition at line 87 of file make_L3_v1.1.c.
| #define CROSS_PRODUCT | ( | x1, | |
| y1, | |||
| x2, | |||
| y2, | |||
| x3, | |||
| y3 | |||
| ) | ( ((x2) - (x1)) * ((y3) - (y1)) - ((y2) - (y1)) * ((x3) - (x1)) ) |
Definition at line 89 of file make_L3_v1.1.c.
| #define DBL_MAX 1.7976931348623157E+308 /* max decimal value of a "double"*/ |
Definition at line 46 of file make_L3_v1.1.c.
Definition at line 55 of file make_L3_v1.1.c.
| #define DEFPROJECTION HAMMER /* Default output projection */ |
Definition at line 48 of file make_L3_v1.1.c.
| #define EPSILON 1e-6 |
Definition at line 84 of file make_L3_v1.1.c.
Definition at line 49 of file make_L3_v1.1.c.
| #define FILL_INT16 -32767 /* Fill value */ |
Definition at line 58 of file make_L3_v1.1.c.
| #define FILL_UINT8 255 /* Fill value */ |
Definition at line 57 of file make_L3_v1.1.c.
| #define FOUR_THIRDS 1.333333333333333333333 |
Definition at line 77 of file make_L3_v1.1.c.
| #define IFOV 0.0015835 /* Instantaneous FOV (rad) */ |
Definition at line 737 of file make_L3_v1.1.c.
| #define IRRAD {171.07, 189.91, 194.33, 188.24, 185.93, 152.14, 123.55, 100.00} /* TOA solar irradiance */ |
Definition at line 66 of file make_L3_v1.1.c.
Definition at line 2214 of file make_L3_v1.1.c.
| #define MAXLENGTH 100 |
Definition at line 83 of file make_L3_v1.1.c.
| #define MAXMEMDEF 500 /* Maximum memory to allocate (in Mbytes) */ |
Definition at line 53 of file make_L3_v1.1.c.
| #define MAXSENZDEF 55. /* Maximum view angle */ |
Definition at line 60 of file make_L3_v1.1.c.
| #define MINREFL 0.00 /* Minimum reflectance allowed for min. blue compositing */ |
Definition at line 59 of file make_L3_v1.1.c.
| #define N_CONVOL 7 |
Definition at line 86 of file make_L3_v1.1.c.
| #define NLPSURF 2160 /* Number of rows in surface pressure file */ |
Definition at line 73 of file make_L3_v1.1.c.
| #define NpixelsLAC 1285 |
Definition at line 80 of file make_L3_v1.1.c.
| #define NPPSURF 4320 /* Number of columns in surface pressure file */ |
Definition at line 74 of file make_L3_v1.1.c.
Definition at line 81 of file make_L3_v1.1.c.
| #define OXYGEN {0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000} /* Coef. for oxygen absorption */ |
Definition at line 70 of file make_L3_v1.1.c.
| #define OZONE {.00103, .00400, .02536, .04200, .09338, .04685, .00837, .00485} /* Coef. for ozone absorption */ |
Definition at line 68 of file make_L3_v1.1.c.
| #define PSURF 1013. /* Sea surface pressure */ |
Definition at line 72 of file make_L3_v1.1.c.
Definition at line 82 of file make_L3_v1.1.c.
Definition at line 79 of file make_L3_v1.1.c.
| #define STEP 1 |
Definition at line 54 of file make_L3_v1.1.c.
| #define TAURAY {0.3139, 0.2341, 0.1561, 0.1324, 0.0942, 0.0439, 0.0257, 0.0155} /* TOA molecular reflectance */ |
Definition at line 67 of file make_L3_v1.1.c.
Definition at line 52 of file make_L3_v1.1.c.
| #define TWO_PI 6.28318530717958647692 |
Definition at line 78 of file make_L3_v1.1.c.
| #define TWO_THIRDS 0.666666666666666666667 |
Definition at line 76 of file make_L3_v1.1.c.
| #define UMASK 002 /* Set permission for created files */ |
Definition at line 61 of file make_L3_v1.1.c.
Definition at line 56 of file make_L3_v1.1.c.
| #define UOZ 0.270 /* Ozone abundance (cm.atm) */ |
Definition at line 71 of file make_L3_v1.1.c.
Definition at line 51 of file make_L3_v1.1.c.
| #define VERSION "1.1" |
Definition at line 91 of file make_L3_v1.1.c.
Definition at line 63 of file make_L3_v1.1.c.
| #define WAVELENGTH { "412", "443", "490", "510", "555", "670", "765", "865"} /* Band wavelength */ |
Definition at line 65 of file make_L3_v1.1.c.
| #define WVAPOR {0.0000, 0.0000, 0.0000, 0.0000, 0.0008, 0.0043, 0.0007, 0.0057} /* Coef. for water vapor abs. */ |
Definition at line 69 of file make_L3_v1.1.c.
| anonymous enum |
Definition at line 40 of file make_L3_v1.1.c.
| anonymous enum |
Definition at line 41 of file make_L3_v1.1.c.
| anonymous enum |
Definition at line 42 of file make_L3_v1.1.c.
| anonymous enum |
Definition at line 43 of file make_L3_v1.1.c.
| anonymous enum |
Definition at line 44 of file make_L3_v1.1.c.
| int alloc_new_array | ( | void ** | data, |
| int | size, | ||
| int32 | num_type, | ||
| int | maxmem | ||
| ) |
Definition at line 1408 of file make_L3_v1.1.c.
| void check_process_parameters | ( | PROCESSINFO * | process, |
| char ** | wl | ||
| ) |
Definition at line 1818 of file make_L3_v1.1.c.
| int16 EVI | ( | float | blue, |
| float | red, | ||
| float | nir | ||
| ) |
Definition at line 1333 of file make_L3_v1.1.c.
| int16 GEMI | ( | float | red, |
| float | nir | ||
| ) |
Definition at line 1388 of file make_L3_v1.1.c.
| int get_geolocation_scan | ( | int | iscan, |
| INPUT * | input, | ||
| PROCESSINFO | process | ||
| ) |
Definition at line 739 of file make_L3_v1.1.c.
| int get_lonlat | ( | double | xproj, |
| double | yproj, | ||
| double * | lon, | ||
| double * | lat, | ||
| int | projtype, | ||
| double | lon_center | ||
| ) |
Definition at line 1210 of file make_L3_v1.1.c.
| int get_xyproj | ( | double | lon, |
| double | lat, | ||
| double * | xproj, | ||
| double * | yproj, | ||
| int | projtype, | ||
| double | lon_center | ||
| ) |
Definition at line 1182 of file make_L3_v1.1.c.
| void init_output_file | ( | OUTPUT * | proj, |
| INPUT | input, | ||
| PROCESSINFO | process | ||
| ) |
Definition at line 1981 of file make_L3_v1.1.c.
| void init_output_projection | ( | OUTPUT * | proj, |
| PROCESSINFO | process | ||
| ) |
Definition at line 1908 of file make_L3_v1.1.c.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 162 of file make_L3_v1.1.c.
| void memcpy_block | ( | int | offset2, |
| int | offset1, | ||
| int | Nrows, | ||
| int | Ncols, | ||
| OUTPUT * | proj | ||
| ) |
Definition at line 1039 of file make_L3_v1.1.c.
| int16 NDVI | ( | float | red, |
| float | nir | ||
| ) |
Definition at line 1317 of file make_L3_v1.1.c.
| void parse_command_line | ( | int | argc, |
| char ** | argv, | ||
| OUTPUT * | proj, | ||
| PROCESSINFO * | process | ||
| ) |
Definition at line 1528 of file make_L3_v1.1.c.
| void process_pixel | ( | int | ipix, |
| int | iline_out, | ||
| int | ipix_out, | ||
| char ** | wl, | ||
| INPUT | input, | ||
| OUTPUT * | proj, | ||
| PROCESSINFO | process | ||
| ) |
Definition at line 1073 of file make_L3_v1.1.c.
| int project_scan | ( | int | iscan, |
| char ** | wl, | ||
| INPUT * | input, | ||
| OUTPUT * | proj, | ||
| PROCESSINFO | process | ||
| ) |
Definition at line 2030 of file make_L3_v1.1.c.
| int read_file_block | ( | char * | filename, |
| char ** | wl, | ||
| int | offset, | ||
| int | startline, | ||
| int | buflines, | ||
| OUTPUT * | proj | ||
| ) |
Definition at line 899 of file make_L3_v1.1.c.
Definition at line 2216 of file make_L3_v1.1.c.
| unsigned char read_mask | ( | double | lon, |
| double | lat, | ||
| int16 | close | ||
| ) |
Definition at line 14 of file read_mask.c.
| void resample_geo_scan | ( | int | Npixels, |
| float * | inlon, | ||
| float * | inlat, | ||
| double * | outlon, | ||
| double * | outlat | ||
| ) |
Definition at line 868 of file make_L3_v1.1.c.
| void set_buffer_parameters | ( | OUTPUT * | proj, |
| PROCESSINFO * | process | ||
| ) |
Definition at line 1747 of file make_L3_v1.1.c.
| void set_proj_parameters | ( | OUTPUT * | proj | ) |
Definition at line 1453 of file make_L3_v1.1.c.
| int16 SMOKE | ( | float ** | rho, |
| int | ipix | ||
| ) |
Definition at line 1302 of file make_L3_v1.1.c.
| int update_file | ( | char * | filename, |
| char ** | wl, | ||
| int | offset, | ||
| int | startline, | ||
| int | buflines, | ||
| OUTPUT * | proj, | ||
| char | verbose, | ||
| char | gzip | ||
| ) |
Definition at line 975 of file make_L3_v1.1.c.
| void update_pixel | ( | INPUT | input, |
| int16 | ndvi, | ||
| int | ipix, | ||
| int | idx_out, | ||
| int | ifno, | ||
| OUTPUT * | proj | ||
| ) |
Definition at line 1242 of file make_L3_v1.1.c.
| void write_cmd_line | ( | int32 | sd_id, |
| char * | cmd_line | ||
| ) |
Definition at line 1423 of file make_L3_v1.1.c.
| float64 sf_angle = 0.01 |
Definition at line 159 of file make_L3_v1.1.c.
| float64 sf_refl = 0.0001 |
Definition at line 159 of file make_L3_v1.1.c.
| float64 sf_smoke = 0.0001 |
Definition at line 159 of file make_L3_v1.1.c.
| float64 sf_vi = 0.0001 |
Definition at line 159 of file make_L3_v1.1.c.
1.7.6.1