OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
l1c.h
Go to the documentation of this file.
1 /*
2  * File: l1c.h
3  * Author: mmontes
4  *
5  * Created on November 4, 2020, 8:45 AM
6  * // last version 3/7/2022
7  */
8 
9 #ifndef L1C_H
10 #define L1C_H
11 
12 #include <stdio.h>
13 #include <string>
14 #include <vector>
15 #include <filetype.h>
16 #include "l1c_filehandle.h"
17 #include "l1c_str.h"
18 #include "l2_str.h"
19 #include "l1c_input.h"
20 #include "hawkeye_methods.h"
21 #include <boost/assign/list_of.hpp> // for 'list_of()'
22 #include <boost/assert.hpp>
23 #include <boost/algorithm/string.hpp>
24 #include <boost/geometry.hpp>
25 #include <boost/geometry/geometries/point_xy.hpp>
26 #include <boost/geometry/geometries/polygon.hpp>
27 #include <boost/geometry/geometries/box.hpp>
28 #include <boost/foreach.hpp>
29 #include <GeographicLib/Geodesic.hpp>
30 #include <GeographicLib/Constants.hpp>
31 
32 #define READ 0
33 #define WRITE 1
34 
35 namespace bg = boost::geometry;
36 typedef bg::model::point<double, 2, bg::cs::geographic<bg::degree>> Point_t;
37 typedef bg::model::polygon<Point_t> Polygon_t;
38 typedef bg::model::box<Point_t> Box_t;
39 
40 
41 namespace l1c {
42 
43 class L1C {
44 protected:
45 
46 public:
47  //methods--------------------------------------
48  L1C();
49  virtual ~L1C();
50  virtual int32_t load_l1c_filehandle4(l1c_filehandle *l1cfile,L1C_input *l1cinput);
51  virtual int32_t ect(l1c_filehandle *l1cfile);//equatorial crossing time calc
52  virtual int32_t ect_sf(const char *filename,l1c_filehandle *l1cfilei,L1C_input *l1cinput);//equatorial crossing time calc per file
53  virtual int32_t ect_sf2(const char *filename,L1C_input *l1cinput,l1c_filehandle *l1cfile);
54  virtual int32_t ect_vec(int swt,l1c_filehandle *l1cfile,std::vector<double>& tvect,std::vector<double>& latvec,std::vector<double>& lonvec,float*tcross,float*loncross);
55  virtual int32_t ect_swt(int swt,l1c_filehandle *l1cfile,int32_t norbs,double *tswt,double *latswt,double *lonswt,float*tcross,float*loncross);
56 
57  virtual int32_t mov_sd2(l1c_filehandle *l1cfile,L1C_input *l1cinput,double *tcross,int16_t *file_id,int16_t *swtd_id,int16_t *nfiles_swt,double *ect_swtd,int16_t *tod,int16_t *orbdir,float *mgv_swath);
58  virtual int32_t mov_sd3(l1c_filehandle *l1cfile,L1C_input *l1cinput,double *tcross,int16_t *file_id,int16_t *swtd_id,int16_t *nfiles_swt,double *ect_swtd,int16_t *tod,int16_t *orbdir,float *mgv_swath);
59  virtual int32_t mov_sd4(l1c_filehandle *l1cfile,L1C_input *l1cinput,double *tcross,int16_t *file_id,int16_t *swtd_id,int16_t *nfiles_swt,double *ect_swtd,int16_t *tod,int16_t *orbdir,float *mgv_swath);
60  virtual int32_t time_swt2(int swtd,l1c_filehandle *l1cfile,L1C_input *l1cinput,double *ect_d,int16_t *swtdid,int16_t *fileid,int16_t *nfiles_swt,float *mgv_swt,double *time_mgv);
61  virtual int32_t time_swt3(int swtd,l1c_filehandle *l1cfile,L1C_input *l1cinput,double *ect_d,int16_t *swtdid,int16_t *fileid,int16_t *nfiles_swt,float *mgv_swt,double *time_mgv);
62  virtual int32_t swtime_vec(int swtd,L1C_input *l1cinput,l1c_filehandle *l1cfile,int16_t time_index[6],std::vector<double>&tvec,double tcross,double mgv1,double *tmgv1);
63  virtual int32_t swtime_swt(int swt,L1C_input *l1cinput,l1c_filehandle *l1cfile,int32_t norbs,int16_t time_index[6],double *tswt,double tcross,double mgv,double *tmgv);
64  virtual int32_t swtime_swt2(int swt,L1C_input *l1cinput,l1c_filehandle *l1cfile,int32_t norbs,double *tswt,double tcross,double mgv,double *tmgv);
65 
66 
67  virtual int32_t azmean_swt(int swt,L1C_input *l1cinput,l1c_filehandle *l1cfile,float *lati,float *loni);
68  virtual int32_t azmean_swt2(int swt,L1C_input *l1cinput,l1c_filehandle *l1cfile,float *lati,float *loni);
69  virtual int32_t interp_swt1(int swtd,l1c_filehandle *l1cfile, L1C_input* l1cinput,int16_t *swtd_id,int16_t *file_id,int16_t *nfiles_swt,double *time_mgv,orb_array *velig,float *lati,float *loni);
70  virtual int32_t interp_swt_dist2(int swtd,l1c_filehandle *l1cfile, L1C_input *l1cinput,int16_t *swtd_id,int16_t *file_id,int16_t *nfiles_swt,double *time_mgv,float *lati,float *loni,float *lati2,float *loni2);
71  virtual int32_t interp_swt_dist3(int swtd,l1c_filehandle *l1cfile, L1C_input *l1cinput,int16_t *swtd_id,int16_t *file_id,int16_t *nfiles_swt,double *time_mgv,float *lati,float *loni,float *lati2,float *loni2);
72  virtual int32_t interp_swt_dist_vec(int swtd, l1c_filehandle* l1cfile, L1C_input* l1cinput, double* time_mgv, float* lati, float* loni, float* lati2, float* loni2);
73  virtual int32_t across_gridlines_l1c(int swtd,l1c_filehandle *l1cfile,L1C_input *l1cinput,int16_t *swtd_id,int16_t *file_id,int16_t *nfiles_swt,float *lati3,float *loni3, float **lat_cgd,float **lon_cgd,float *az_east);
74  virtual int32_t across_gridlines_l1c2(int swtd,l1c_filehandle *l1cfile,L1C_input *l1cinput,int16_t *swtd_id,int16_t *file_id,int16_t *nfiles_swt,float *lati3,float *loni3, float **lat_cgd,float **lon_cgd,float *az_east);
75  virtual int32_t across_gridlines_l1c_vec(int swtd, l1c_filehandle* l1cfile, L1C_input* l1cinput,float* lati2, float* loni2, float** lat_gd, float** lon_gd, float* az_east);
76  virtual int32_t across_gridlines_l1c_vec2(int swtd, l1c_filehandle* l1cfile, L1C_input* l1cinput,float* lati2, float* loni2, float** lat_gd, float** lon_gd, float* az_east);//swath
77  virtual int32_t across_gridlines_l1c_vec3(int swtd, l1c_filehandle* l1cfile, L1C_input* l1cinput,float* lati2, float* loni2, float** lat_gd, float** lon_gd, float* az_east);//granule
78  virtual int32_t write_L1C_granule(int swtd, l1c_filehandle* l1cfile, L1C_input* l1cinput,double *tmgv,float** lat_gd, float** lon_gd);
79 
80  virtual int32_t open_l2tol1c(l1c_filehandle *l1cfile, L1C_input *l1cinput);
81  virtual int32_t open_l1atol1c(L1C_input *l1cinput,l1c_filehandle *l1cfile);
82 
83 
84  virtual bool sbs2_l1c(L1C_input *l1cinput,int32_t ydim,int32_t xdim,float **alat, short **alat_index,float latpix,float lonpix,float **lon_gd,short *erow, short *ecol);
85  virtual void sbs2_sort_latgd(l1c_filehandle *l1cfile,float **lat_gd,float **lat_asort,short **index_xy);
86  virtual void search_rc_l1c(L1C_input *l1cinput,l1c_filehandle *l1cfile,float lat_pix,float lon_pix,double otime_pix,float lon_eqc,short *rowindex,short *colindex,short Nneg);
87  virtual int32_t search_SOCEA(L1C_input* l1cinput, l1c_filehandle* l1cfile, float** lat_gd, float **lon_gd, double *time_mgv, float ect,float loncross);
88  virtual int32_t create_SOCEA(int swtd,L1C_input* l1cinput, l1c_filehandle* l1cfile,float** lat_gd, float **lon_gd);
89 
90  virtual int32_t binL1C_wgranule2(int swtd,l1c_filehandle *l1cfile, L1C_input *l1cinput,int16_t *swtd_id,int16_t *odir,int16_t *file_id,int16_t *nfiles_swt);
91  virtual int32_t binL1C_wgranule3(int swtd,l1c_filehandle *l1cfile, L1C_input *l1cinput,int16_t *swtd_id,int16_t *odir,int16_t *file_id,int16_t *nfiles_swt);
92  virtual int32_t binL1C_wgranule4(int swtd,l1c_filehandle *l1cfile, L1C_input *l1cinput,int16_t *swtd_id,int16_t *odir,int16_t *file_id,int16_t *nfiles_swt);
93  virtual int32_t binL1C_wgranule5(int swtd,l1c_filehandle *l1cfile, L1C_input *l1cinput,int16_t *swtd_id,int16_t *odir,int16_t *file_id,int16_t *nfiles_swt);
94  virtual int32_t binL1C_wgranule6(int swtd,l1c_filehandle *l1cfile, L1C_input *l1cinput,int16_t *swtd_id,int16_t *odir,int16_t *file_id,int16_t *nfiles_swt);
95  virtual int32_t binL1C_wgranule7(int swtd,l1c_filehandle *l1cfile, L1C_input *l1cinput,int16_t *swtd_id,int16_t *odir,int16_t *file_id,int16_t *nfiles_swt);
96  virtual int32_t binL1C_wgranule_aw(int swtd,l1c_filehandle *l1cfile, L1C_input *l1cinput,int16_t *swtd_id,int16_t *odir,int16_t *file_id,int16_t *nfiles_swt);
97  virtual int32_t binL1C_wgranule_aw2(int swtd,l1c_filehandle *l1cfile, L1C_input *l1cinput,l1c_str *l1cstr, float **lat_gd,float **lon_gd,float *az_east,float **Ltfracsum,float **areabinsum,float **nobs_perbin,size_t sline);
98  virtual double binL1C_pixelpoly(l1c_filehandle *l1cfile, L1C_input *l1cinput,l1c_str *l1cstr,short gd_row,short gd_col,int32_t pix);
99  virtual int32_t openL1Cgrid(int swtd,l1c_str *l1cstr,l1c_filehandle *l1cfile,L1C_input *l1cinput,int16_t* swtd_id,int16_t* file_id, int16_t* nfiles_swt,float **lat_gd, float **lon_gd,float *az_east,float **lat_asort,short **index_xy);
100  virtual int32_t binL1C_sbs_line(int swtd,L1C *l1c,l1c_str *l1cstr,l1c_filehandle *l1cfile,L1C_input *l1cinput,int16_t* swtd_id,int16_t* file_id, int16_t* nfiles_swt,float **lat_gd, float **lon_gd,float *az_east,float **lat_asort,short **index_xy,float ****binLt,int ****bincount,size_t recnums,int granid);
101  virtual int32_t binL1C_sbs_line_l2(int swtd,L1C *l1c,l2_str *l2str,l1c_filehandle *l1cfile,L1C_input *l1cinput,int16_t* swtd_id,int16_t* file_id, int16_t* nfiles_swt,float **lat_gd, float **lon_gd,float *az_east,float **lat_asort,short **index_xy,float ****binmean_prod,int ****bincount,size_t sline,int granid);
102 
103  virtual int32_t xy_pixsize(int swtd,l1c_filehandle *l1cfile, int16_t *swtd_id,int16_t *odir,int16_t *file_id,int16_t *nfiles_swt,float **binx_size_u, float **binx_size_v);
104  virtual int32_t xy_pixsize_sf2(const char* filename,l1c_filehandle *l1cfile,L1C_input *l1cinput,float **pix_size_u,float **pix_size_v,float **lat_gd, float **lon_gd,double **lat_cgd,double **lon_cgd,float **Ltfracsum,float **areabinsum,float **nobs_perbin);
105  virtual int32_t xy_pixsize_sf3(const char* filename,l1c_filehandle *l1cfile,L1C_input *l1cinput,float **pix_size_u,float **pix_size_v,float **lat_gd, float **lon_gd,double **lat_cgd,double **lon_cgd,float **Ltfracsum,float **areabinsum,float **nobs_perbin,float **lat_asort,short **index_xy);
106 
107 
108  virtual int32_t pix_corners4_l1c(l1c_filehandle *l1cfile,L1C_input *l1cinput,float dist_u,float dist_v,float azpix, int32_t scanline,int32_t pix,float pixlat,float pixlon,float pixLt,float **lat_asort,short **index_xy,float **lat_gd,float **lon_gd,double **lat_cgd,double **lon_cgd,double areaFracBox[3][3],float **Ltfracsum,float **areabinsum,float **nobs_perbin);
109  virtual int32_t pix_corners4_l1c2(l1c_filehandle *l1cfile,L1C_input *l1cinput,float dist_u,float dist_v,float azpix, int32_t scanline,int32_t pix,float pixlat,float pixlon,float pixLt,short row,short col,float **lat_gd,float **lon_gd,double areaFracBox[3][3],double **Ltfracsum,double **areabinsum,float **nobs_perbin);
110  virtual int32_t pix_corners4_l1c3(l1c_filehandle *l1cfile,L1C_input *l1cinput,float dist_u,float dist_v,float azpix, int32_t scanline,int32_t pix,float pixlat,float pixlon,float pixLt,short row,short col,float **lat_gd,float **lon_gd,double areaFracBox[3][3],double areaBinbox[3][3]);
111  virtual int32_t gwindowTopix_l1c(l1c_filehandle *l1cfile,L1C_input *l1cinput,short gd_row, short gd_col,float **lat_gd,float **lon_gd,double **latcornBox,double **loncornBox);
112  virtual int32_t pixcornBox(l1c_filehandle *l1cfile,L1C_input *l1cinput,float dist_u,float dist_v,float azpix, int32_t scanline,int32_t pix,float pixlat,float pixlon,float pixLt,short gd_row,short gd_col,float **lat_gd,float **lon_gd, Polygon_t &pixelPoly);
113 
114 
115  virtual bool binIntersectsPix4corn(int32_t row, int32_t col, double **lat_cgd,double **lon_cgd,Polygon_t &pixelPoly, double &areaFrac);
116  virtual bool binIntersectsPix4corn2(int32_t row, int32_t col, double **lat_cgd,double **lon_cgd,Polygon_t &pixelPoly, double areaFracBox[3][3]);
117  virtual bool binIntersectsPix4corn3(short row, short col, double **lat_cgd,double **lon_cgd,Polygon_t &pixelPoly, double areaFracBox[3][3],double areabinBox[3][3]);
118  virtual bool binIntersectsPix4corn4_l1c(l1c_filehandle *l1cfile,L1C_input *l1cinput,short row, short col, float **lat_gd,float **lon_gd,Polygon_t &pixelPoly, double areaFracBox[3][3],double areabinBox[3][3]);
119 
120  virtual bool binIntersectsPix2corn(int32_t row, int32_t col, double **lat_cgd,double **lon_cgd,Box_t &pixelBox, double &areaFrac);
121  virtual bool binIntersectsPix2corn2(int32_t row, int32_t col, double **lat_cgd,double **lon_cgd,Box_t &pixelBox, double areaFracBox[3][3]);
122  virtual int32_t savebinL1C_v2(int swtd,L1C_input *l1cinput,l1c_filehandle *l1cfile,float **lat_gd,float **lon_gd,float **Ltfracsum,float **areafracsum,float **nobs_perbin);
123 
124  //---------------------------------------------
125  //global attributes----
126  std::string l1b_name;//just the input l1b filenamed
127  size_t sd_id;
128 
129 
130  //more L1C input vars
131  size_t l1c_pflag;//L1C processing
132  std::vector<std::string> cust_l1cprod;//list of L1c products to be included, flexible approach
133 
134 
135  file_type format;//file type, netcdf4 or hdf4/5
136  size_t mode;//read/write file mode
137  size_t length;//data block
138  size_t sensorID;//original int32 changed to size_t type
139  size_t subsensorID;
140  float res_spat;//spatial resolution in km
141  float res_spec;//spectral resolution in nm
142 
143  //time-space limits of image
144  int16_t syear;
145  int16_t sday;
146  float minlat_img;
147  float maxlat_img;
148  float minlon_img;
149  float maxlon_img;
150 
151  //dimensions--
152  size_t ndets;
153  size_t nscan;
154  size_t n_views;//sensor views
155  size_t npols; //polarization states
156  size_t nbands;//number of total bands
157  size_t nband_blue;//this includes uv + visible bands
158  size_t nband_red;//this inc
159  size_t nband_swir;
160  size_t npix;//num
161 
162  //sensor characteritics
163  float *views;//indexes are not defined
164  size_t pols[3];//[1 0 0] non-pol, [1 1 0]: non+cross, [1 1 1]: non+cross+parall
165  float *bbands;//array with bands wavelengths
166  float *rbands;
167  float *swirbands;
168 
169 
170  //navigation attributes
171  //fred attr here
172  size_t orbit_number;
173  size_t orb_dir;//asc or desc orbit
174  float orbit_node_lon;//long at which is crossing the equator asc or desc
175 
176  //geolocation attributes
179  float *cloud_height; //should be in geolocation group nc file
180 
181  //calibration attributes
182  float *Fobar;
183 
184  //projection attributes-
185  //std::string proj_type;
186  size_t proj_type;
187  float gres;//grid resolution in km
188  //these params go to proj class
189  //float rot_az;//rotation pole params
190  float lat0;
191  //float lon0;
192  //float latc;
193  //float lonc;
194 
195  //multi attributes (view, pol, bands)
196  float *view_agg; //views to be aggregated for later products such as vsfs etc
197  float *pol_agg;//polarization states to be aggregated for post-processing products, linear depolarization ratio etc
198  float *band_agg;//specific bands for future merged products
199  size_t overlap_vflag;//tells if we want merged views
200  size_t overlap_pflag;//tells if we want merged polarizations
201  size_t overlap_bflag;//tells if we want merged spectral bands
202  //uncertainty params for merged l1c products
203  size_t unc_meth;//0: no error calculation, 1: propagation, 2: Monte Carlo
204  float unc_thres_v; //uncertainity threshold of angular merged products as %
205  float unc_thres_p;//same but for polarization
206  float unc_thres_b;//same but for spectral bands
207  //ancill info, requested products?
208  //float *cloud_h;//this is cloud_height
209 };
210 
211 int32_t load_l1c_filehandle4(l1c_filehandle *l1cfile,L1C_input *l1cinput);
212 int32_t ect(l1c_filehandle *l1cfile);
213 int32_t ect_sf(const char *filename,l1c_filehandle *l1cfile,L1C_input *l1cinput);
214 int32_t mov_sd2(l1c_filehandle *l1cfile,L1C_input *l1cinput,double *tcross,int16_t *file_id,int16_t *swtd_id,int16_t *nfiles_swt,double *ect_swtd,int16_t *tod,int16_t *orbdir,float *mgv_swath);
215 int32_t mov_sd3(l1c_filehandle *l1cfile,L1C_input *l1cinput,double *tcross,int16_t *file_id,int16_t *swtd_id,int16_t *nfiles_swt,double *ect_swtd,int16_t *tod,int16_t *orbdir,float *mgv_swath);
216 int32_t mov_sd4(l1c_filehandle *l1cfile,L1C_input *l1cinput,double *tcross,int16_t *file_id,int16_t *swtd_id,int16_t *nfiles_swt,double *ect_swtd,int16_t *tod,int16_t *orbdir,float *mgv_swath);
217 int32_t ect_sf2(const char *filename,L1C_input *l1cinput,l1c_filehandle *l1cfile);
218 int32_t ect_vec(int swt,l1c_filehandle *l1cfile,std::vector<double>& tvect,std::vector<double>& latvec,std::vector<double>& lonvec,float*tcross,float*loncross);
219 int32_t ect_swt(int swt,l1c_filehandle *l1cfile,int32_t norbs,double *tswt,double *latswt,double *lonswt,float*tcross,float*loncross);
220 
221 int32_t time_swt2(int swtd,l1c_filehandle *l1cfile,L1C_input *l1cinput,double *ect_d,int16_t *swtdid,int16_t *fileid,int16_t *nfiles_swt,float *mgv_swt,double *time_mgv);
222 int32_t time_swt3(int swtd,l1c_filehandle *l1cfile,L1C_input *l1cinput,double *ect_d,int16_t *swtdid,int16_t *fileid,int16_t *nfiles_swt,float *mgv_swt,double *time_mgv);
223 int32_t swtime_vec(int swtd,L1C_input *l1cinput,l1c_filehandle *l1cfile,int16_t time_index[6],std::vector<double>&tvec,double tcross,double mgv1,double *tmgv1);
224 int32_t swtime_swt(int swt,L1C_input *l1cinput,l1c_filehandle *l1cfile,int32_t norbs,int16_t time_index[6],double *tswt,double tcross,double mgv,double *tmgv);
225 int32_t swtime_swt2(int swt,L1C_input *l1cinput,l1c_filehandle *l1cfile,int32_t norbs,double *tswt,double tcross,double mgv,double *tmgv);
226 
227 
228 int32_t azmean_swt(int swt,L1C_input *l1cinput,l1c_filehandle *l1cfile,float *lati,float *loni);
229 int32_t azmean_swt2(int swt,L1C_input *l1cinput,l1c_filehandle *l1cfile,float *lati,float *loni);
230 int32_t interp_swt1(int swtd,l1c_filehandle *l1cfile, L1C_input* l1cinput,int16_t *swtd_id,int16_t *file_id,int16_t *nfiles_swt,double *time_mgvi,orb_array *velig,float *lati,float *loni);
231 int32_t interp_swt_dist2(int swtd,l1c_filehandle *l1cfile, L1C_input *l1cinput,int16_t *swtd_id,int16_t *file_id,int16_t *nfiles_swt,double *time_mgv,float *lati,float *loni,float *lati2,float *loni2);
232 int32_t interp_swt_dist3(int swtd,l1c_filehandle *l1cfile, L1C_input *l1cinput,int16_t *swtd_id,int16_t *file_id,int16_t *nfiles_swt,double *time_mgv,float *lati,float *loni,float *lati2,float *loni2);
233 int32_t interp_swt_dist_vec(int swtd, l1c_filehandle* l1cfile, L1C_input* l1cinput, double* time_mgv, float* lati, float* loni, float* lati2, float* loni2);
234 
235 
236 int32_t across_gridlines_l1c(int swtd,l1c_filehandle *l1cfile,L1C_input *l1cinput,int16_t *swtd_id,int16_t *file_id,int16_t *nfiles_swt,float *lati3,float *loni3, float **lat_cgd,float **lon_cgd,float *az_east);
237 int32_t across_gridlines_l1c2(int swtd,l1c_filehandle *l1cfile,L1C_input *l1cinput,int16_t *swtd_id,int16_t *file_id,int16_t *nfiles_swt,float *lati3,float *loni3, float **lat_cgd,float **lon_cgd,float *az_east);
238 int32_t across_gridlines_l1c_vec(int swtd, l1c_filehandle* l1cfile, L1C_input* l1cinput,float* lati2, float* loni2, float** lat_gd, float** lon_gd, float* az_east);
239 int32_t across_gridlines_l1c_vec2(int swtd, l1c_filehandle* l1cfile, L1C_input* l1cinput,float* lati2, float* loni2, float** lat_gd, float** lon_gd, float* az_east);
240 int32_t across_gridlines_l1c_vec3(int swtd, l1c_filehandle* l1cfile, L1C_input* l1cinput,float* lati2, float* loni2, float** lat_gd, float** lon_gd, float* az_east);
241 int32_t write_L1C_granule(int swtd, l1c_filehandle* l1cfile, L1C_input* l1cinput,double *tmgv,float** lat_gd, float** lon_gd);
242 
243 bool sbs2_l1c(L1C_input *l1cinput,int32_t ydim,int32_t xdim,float **alat, short **alat_index,float latpix,float lonpix,float **lon_gd,short *erow, short *ecol);
244 void sbs2_sort_latgd(l1c_filehandle *l1cfile,float **lat_gd,float **lat_asort,short **index_xy);
245 void search_rc_l1c(L1C_input *l1cinput,l1c_filehandle *l1cfile,float lat_pix,float lon_pix,double otime_pix,float lon_eqc,short *rowindex,short *colindex, short Nneg);
246 int32_t search_SOCEA(L1C_input* l1cinput, l1c_filehandle* l1cfile, float** lat_gd, float **lon_gd, double *time_mgv, float ect,float loncross);
247 int32_t create_SOCEA(int swtd,L1C_input* l1cinput, l1c_filehandle* l1cfile,float** lat_gd, float **lon_gd);
248 
249 
250 int32_t binL1C_wgranule2(int swtd,l1c_filehandle *l1cfile, L1C_input *l1cinput,int16_t *swtd_id,int16_t *odir,int16_t *file_id,int16_t *nfiles_swt);
251 int32_t binL1C_wgranule3(int swtd,l1c_filehandle *l1cfile, L1C_input *l1cinput,int16_t *swtd_id,int16_t *odir,int16_t *file_id,int16_t *nfiles_swt);
252 int32_t binL1C_wgranule4(int swtd,l1c_filehandle *l1cfile, L1C_input *l1cinput,int16_t *swtd_id,int16_t *odir,int16_t *file_id,int16_t *nfiles_swt);
253 int32_t binL1C_wgranule5(int swtd,l1c_filehandle *l1cfile, L1C_input *l1cinput,int16_t *swtd_id,int16_t *odir,int16_t *file_id,int16_t *nfiles_swt);
254 int32_t binL1C_wgranule6(int swtd,l1c_filehandle *l1cfile, L1C_input *l1cinput,int16_t *swtd_id,int16_t *odir,int16_t *file_id,int16_t *nfiles_swt);
255 int32_t binL1C_wgranule7(int swtd,l1c_filehandle *l1cfile, L1C_input *l1cinput,int16_t *swtd_id,int16_t *odir,int16_t *file_id,int16_t *nfiles_swt);
256 int32_t binL1C_wgranule_aw(int swtd,l1c_filehandle *l1cfile, L1C_input *l1cinput,int16_t *swtd_id,int16_t *odir,int16_t *file_id,int16_t *nfiles_swt);
257 int32_t binL1C_wgranule_aw2(int swtd,l1c_filehandle *l1cfile, L1C_input *l1cinput,l1c_str *l1cstr, float **lat_gd,float **lon_gd,float *az_east,float **Ltfracsum,float **areabinsum,float **nobs_perbin,size_t sline);
258 double binL1C_pixelpoly(l1c_filehandle *l1cfile,L1C_input *l1cinput,l1c_str *l1cstr,short gd_row,short gd_col,int32_t pix);
259 int32_t openL1Cgrid(int swtd,l1c_str *l1cstr,l1c_filehandle *l1cfile,L1C_input *l1cinput,int16_t* swtd_id,int16_t* file_id, int16_t* nfiles_swt,float **lat_gd, float **lon_gd,float *az_east,float **lat_asort,short **index_xy);
260 int32_t binL1C_sbs_line(int swtd,L1C *l1c,l1c_str *l1cstr,l1c_filehandle *l1cfile,L1C_input *l1cinput,int16_t* swtd_id,int16_t* file_id, int16_t* nfiles_swt,float **lat_gd, float **lon_gd,float *az_east,float **lat_asort,short **index_xy,float ****binLt,int ****bincount,size_t recnums,int granid);
261 int32_t binL1C_sbs_line_l2(int swtd,L1C *l1c,l2_str *l2str,l1c_filehandle *l1cfile,L1C_input *l1cinput,int16_t* swtd_id,int16_t* file_id, int16_t* nfiles_swt,float **lat_gd, float **lon_gd,float *az_east,float **lat_asort,short **index_xy,float ****binmean_prod,int ****bincount,size_t sline,int granid);
262 
263 int32_t xy_pixsize(int swtd,l1c_filehandle *l1cfile, int16_t *swtd_id,int16_t *odir,int16_t *file_id,int16_t *nfiles_swt,float **binx_size_u, float **binx_size_v);
264 int32_t xy_pixsize_sf2(const char* filename,l1c_filehandle *l1cfile,L1C_input *l1cinput,float **pix_size_u,float **pix_size_v,float **lat_gd, float **lon_gd,double **lat_cgd,double **lon_cgd,float **Ltfracsum,float **areabinsum,float **nobs_perbin);
265 int32_t xy_pixsize_sf3(const char* filename,l1c_filehandle *l1cfile,L1C_input *l1cinput,float **pix_size_u,float **pix_size_v,float **lat_gd, float **lon_gd,double **lat_cgd,double **lon_cgd,float **Ltfracsum,float **areabinsum,float **nobs_perbin,float **lat_asort,short **index_xy);
266 int32_t pix_corners(float dist_u,float dist_v,float azpix, int32_t scanline,int32_t pix,float pixlat,float pixlon);
267 int32_t pix_corners4_l1c(l1c_filehandle *l1cfile,L1C_input *l1cinput,float dist_u,float dist_v,float azpix, int32_t scanline,int32_t pix,float pixlat,float pixlon,float pixLt,float **lat_asort,short **index_xy,float **lat_gd,float **lon_gd,double **lat_cgd,double **lon_cgd,double areaFracBox[3][3],float **Ltfracsum,float **areabinsum,float **nobs_perbin);
268 int32_t pix_corners4_l1c2(l1c_filehandle *l1cfile,L1C_input *l1cinput,float dist_u,float dist_v,float azpix, int32_t scanline,int32_t pix,float pixlat,float pixlon,float pixLt,short row,short col,float **lat_gd,float **lon_gd,double areaFracBox[3][3],double **Ltfracsum,double **areabinsum,float **nobs_perbin);
269 int32_t pix_corners4_l1c3(l1c_filehandle *l1cfile,L1C_input *l1cinput,float dist_u,float dist_v,float azpix, int32_t scanline,int32_t pix,float pixlat,float pixlon,float pixLt,short row,short col,float **lat_gd,float **lon_gd,double areaFracBox[3][3],double areaBinbox[3][3]);
270 int32_t gwindowTopix_l1c(l1c_filehandle *l1cfile,L1C_input *l1cinput,short gd_row, short gd_col,float **lat_gd,float **lon_gd,double **latcornBox,double **loncornBox);
271 int32_t pixcornBox(l1c_filehandle *l1cfile,L1C_input *l1cinput,float dist_u,float dist_v,float azpix, int32_t scanline,int32_t pix,float pixlat,float pixlon,float pixLt,short gd_row,short gd_col,float **lat_gd,float **lon_gd, Polygon_t &pixelPoly);
272 bool binIntersectsPix4corn(int32_t row, int32_t col, double **lat_cgd,double **lon_cgd,Polygon_t &pixelPoly, double &areaFrac);
273 bool binIntersectsPix4corn2(int32_t row, int32_t col, double **lat_cgd,double **lon_cgd,Polygon_t &pixelPoly, double areaFracBox[3][3]);
274 bool binIntersectsPix4corn3(short row, short col, double **lat_cgd,double **lon_cgd,Polygon_t &pixelPoly, double areaFracBox[3][3],double areabinBox[3][3]);
275 bool binIntersectsPix4corn4_l1c(l1c_filehandle *l1cfile,L1C_input *l1cinput,short row, short col, float **lat_gd,float **lon_gd,Polygon_t &pixelPoly, double areaFracBox[3][3],double areabinBox[3][3]);
276 bool binIntersectsPix2corn(int32_t row, int32_t col, double **lat_cgd,double **lon_cgd,Box_t &pixelBox, double &areaFrac);
277 bool binIntersectsPix2corn2(int32_t row, int32_t col, double **lat_cgd,double **lon_cgd,Box_t &pixelBox, double areaFracBox[3][3]);
278 int32_t savebinL1C_v2(int swtd,L1C_input *l1cinput,l1c_filehandle *l1cfile,float **lat_gd,float **lon_gd,float **Ltfracsum,float **areafracsum,float **nobs_perbin);
279 int32_t open_l2tol1c(l1c_filehandle *l1cfile, L1C_input *l1cinput);
280 int32_t open_l1atol1c(L1C_input *l1cinput,l1c_filehandle *l1cfile);
281 } //end namespace
282 #endif
virtual void sbs2_sort_latgd(l1c_filehandle *l1cfile, float **lat_gd, float **lat_asort, short **index_xy)
Definition: l1c.cpp:5440
int32_t binL1C_sbs_line_l2(int swtd, L1C *l1c, l2_str *l2str, l1c_filehandle *l1cfile, L1C_input *l1cinput, int16_t *swtd_id, int16_t *file_id, int16_t *nfiles_swt, float **lat_gd, float **lon_gd, float *az_east, float **lat_asort, short **index_xy, float ****binmean_prod, int ****bincount, size_t sline, int granid)
size_t subsensorID
Definition: l1c.h:139
virtual int32_t binL1C_wgranule_aw2(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, l1c_str *l1cstr, float **lat_gd, float **lon_gd, float *az_east, float **Ltfracsum, float **areabinsum, float **nobs_perbin, size_t sline)
Definition: l1c.cpp:6908
virtual int32_t pix_corners4_l1c(l1c_filehandle *l1cfile, L1C_input *l1cinput, float dist_u, float dist_v, float azpix, int32_t scanline, int32_t pix, float pixlat, float pixlon, float pixLt, float **lat_asort, short **index_xy, float **lat_gd, float **lon_gd, double **lat_cgd, double **lon_cgd, double areaFracBox[3][3], float **Ltfracsum, float **areabinsum, float **nobs_perbin)
Definition: l1c.cpp:15103
virtual int32_t time_swt2(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, double *ect_d, int16_t *swtdid, int16_t *fileid, int16_t *nfiles_swt, float *mgv_swt, double *time_mgv)
Definition: l1c.cpp:22621
bool binIntersectsPix2corn2(int32_t row, int32_t col, double **lat_cgd, double **lon_cgd, Box_t &pixelBox, double areaFracBox[3][3])
virtual int32_t savebinL1C_v2(int swtd, L1C_input *l1cinput, l1c_filehandle *l1cfile, float **lat_gd, float **lon_gd, float **Ltfracsum, float **areafracsum, float **nobs_perbin)
Definition: l1c.cpp:2388
int32_t binL1C_wgranule5(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, int16_t *swtd_id, int16_t *odir, int16_t *file_id, int16_t *nfiles_swt)
bool binIntersectsPix4corn(int32_t row, int32_t col, double **lat_cgd, double **lon_cgd, Polygon_t &pixelPoly, double &areaFrac)
int32_t binL1C_wgranule7(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, int16_t *swtd_id, int16_t *odir, int16_t *file_id, int16_t *nfiles_swt)
virtual int32_t binL1C_sbs_line_l2(int swtd, L1C *l1c, l2_str *l2str, l1c_filehandle *l1cfile, L1C_input *l1cinput, int16_t *swtd_id, int16_t *file_id, int16_t *nfiles_swt, float **lat_gd, float **lon_gd, float *az_east, float **lat_asort, short **index_xy, float ****binmean_prod, int ****bincount, size_t sline, int granid)
Definition: l1c.cpp:5893
float * Fobar
Definition: l1c.h:182
virtual int32_t across_gridlines_l1c_vec2(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, float *lati2, float *loni2, float **lat_gd, float **lon_gd, float *az_east)
Definition: l1c.cpp:18355
int16_t syear
Definition: l1c.h:144
int32_t ect_swt(int swt, l1c_filehandle *l1cfile, int32_t norbs, double *tswt, double *latswt, double *lonswt, float *tcross, float *loncross)
std::string l1b_name
Definition: l1c.h:126
float orbit_node_lon
Definition: l1c.h:174
virtual int32_t binL1C_sbs_line(int swtd, L1C *l1c, l1c_str *l1cstr, l1c_filehandle *l1cfile, L1C_input *l1cinput, int16_t *swtd_id, int16_t *file_id, int16_t *nfiles_swt, float **lat_gd, float **lon_gd, float *az_east, float **lat_asort, short **index_xy, float ****binLt, int ****bincount, size_t recnums, int granid)
Definition: l1c.cpp:6374
int32_t across_gridlines_l1c_vec2(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, float *lati2, float *loni2, float **lat_gd, float **lon_gd, float *az_east)
size_t overlap_vflag
Definition: l1c.h:199
virtual int32_t write_L1C_granule(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, double *tmgv, float **lat_gd, float **lon_gd)
Definition: l1c.cpp:16746
virtual double binL1C_pixelpoly(l1c_filehandle *l1cfile, L1C_input *l1cinput, l1c_str *l1cstr, short gd_row, short gd_col, int32_t pix)
Definition: l1c.cpp:5555
int32_t pix_corners(float dist_u, float dist_v, float azpix, int32_t scanline, int32_t pix, float pixlat, float pixlon)
float * swirbands
Definition: l1c.h:167
int32_t swtime_vec(int swtd, L1C_input *l1cinput, l1c_filehandle *l1cfile, int16_t time_index[6], std::vector< double > &tvec, double tcross, double mgv1, double *tmgv1)
float orb_array[3]
virtual int32_t ect_sf2(const char *filename, L1C_input *l1cinput, l1c_filehandle *l1cfile)
Definition: l1c.cpp:23904
int32_t open_l2tol1c(l1c_filehandle *l1cfile, L1C_input *l1cinput)
size_t orbit_number
Definition: l1c.h:172
virtual int32_t xy_pixsize_sf3(const char *filename, l1c_filehandle *l1cfile, L1C_input *l1cinput, float **pix_size_u, float **pix_size_v, float **lat_gd, float **lon_gd, double **lat_cgd, double **lon_cgd, float **Ltfracsum, float **areabinsum, float **nobs_perbin, float **lat_asort, short **index_xy)
Definition: l1c.cpp:16258
int32_t mov_sd4(l1c_filehandle *l1cfile, L1C_input *l1cinput, double *tcross, int16_t *file_id, int16_t *swtd_id, int16_t *nfiles_swt, double *ect_swtd, int16_t *tod, int16_t *orbdir, float *mgv_swath)
int32_t write_L1C_granule(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, double *tmgv, float **lat_gd, float **lon_gd)
int32_t ect(l1c_filehandle *l1cfile)
float * band_agg
Definition: l1c.h:198
bool binIntersectsPix4corn2(int32_t row, int32_t col, double **lat_cgd, double **lon_cgd, Polygon_t &pixelPoly, double areaFracBox[3][3])
virtual int32_t open_l1atol1c(L1C_input *l1cinput, l1c_filehandle *l1cfile)
Definition: l1c.cpp:560
int32_t time_swt3(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, double *ect_d, int16_t *swtdid, int16_t *fileid, int16_t *nfiles_swt, float *mgv_swt, double *time_mgv)
virtual bool binIntersectsPix4corn4_l1c(l1c_filehandle *l1cfile, L1C_input *l1cinput, short row, short col, float **lat_gd, float **lon_gd, Polygon_t &pixelPoly, double areaFracBox[3][3], double areabinBox[3][3])
Definition: l1c.cpp:2520
virtual int32_t pix_corners4_l1c2(l1c_filehandle *l1cfile, L1C_input *l1cinput, float dist_u, float dist_v, float azpix, int32_t scanline, int32_t pix, float pixlat, float pixlon, float pixLt, short row, short col, float **lat_gd, float **lon_gd, double areaFracBox[3][3], double **Ltfracsum, double **areabinsum, float **nobs_perbin)
Definition: l1c.cpp:16075
bg::model::polygon< Point_t > Polygon_t
Definition: l1c.h:37
virtual int32_t ect_swt(int swt, l1c_filehandle *l1cfile, int32_t norbs, double *tswt, double *latswt, double *lonswt, float *tcross, float *loncross)
Definition: l1c.cpp:412
size_t ndets
Definition: l1c.h:152
int32_t across_gridlines_l1c2(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, int16_t *swtd_id, int16_t *file_id, int16_t *nfiles_swt, float *lati3, float *loni3, float **lat_cgd, float **lon_cgd, float *az_east)
size_t nband_red
Definition: l1c.h:158
int32_t binL1C_wgranule_aw2(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, l1c_str *l1cstr, float **lat_gd, float **lon_gd, float *az_east, float **Ltfracsum, float **areabinsum, float **nobs_perbin, size_t sline)
virtual bool binIntersectsPix4corn(int32_t row, int32_t col, double **lat_cgd, double **lon_cgd, Polygon_t &pixelPoly, double &areaFrac)
Definition: l1c.cpp:4633
virtual int32_t xy_pixsize(int swtd, l1c_filehandle *l1cfile, int16_t *swtd_id, int16_t *odir, int16_t *file_id, int16_t *nfiles_swt, float **binx_size_u, float **binx_size_v)
Definition: l1c.cpp:16638
size_t unc_meth
Definition: l1c.h:203
virtual int32_t xy_pixsize_sf2(const char *filename, l1c_filehandle *l1cfile, L1C_input *l1cinput, float **pix_size_u, float **pix_size_v, float **lat_gd, float **lon_gd, double **lat_cgd, double **lon_cgd, float **Ltfracsum, float **areabinsum, float **nobs_perbin)
Definition: l1c.cpp:16430
size_t n_views
Definition: l1c.h:154
int32_t binL1C_wgranule_aw(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, int16_t *swtd_id, int16_t *odir, int16_t *file_id, int16_t *nfiles_swt)
int32_t swtime_swt2(int swt, L1C_input *l1cinput, l1c_filehandle *l1cfile, int32_t norbs, double *tswt, double tcross, double mgv, double *tmgv)
int32_t azmean_swt(int swt, L1C_input *l1cinput, l1c_filehandle *l1cfile, float *lati, float *loni)
int32_t ect_sf(const char *filename, l1c_filehandle *l1cfile, L1C_input *l1cinput)
size_t npix
Definition: l1c.h:160
@ string
virtual int32_t binL1C_wgranule2(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, int16_t *swtd_id, int16_t *odir, int16_t *file_id, int16_t *nfiles_swt)
Definition: l1c.cpp:14311
int32_t pix_corners4_l1c3(l1c_filehandle *l1cfile, L1C_input *l1cinput, float dist_u, float dist_v, float azpix, int32_t scanline, int32_t pix, float pixlat, float pixlon, float pixLt, short row, short col, float **lat_gd, float **lon_gd, double areaFracBox[3][3], double areaBinbox[3][3])
virtual bool binIntersectsPix2corn(int32_t row, int32_t col, double **lat_cgd, double **lon_cgd, Box_t &pixelBox, double &areaFrac)
Definition: l1c.cpp:4948
virtual int32_t pix_corners4_l1c3(l1c_filehandle *l1cfile, L1C_input *l1cinput, float dist_u, float dist_v, float azpix, int32_t scanline, int32_t pix, float pixlat, float pixlon, float pixLt, short row, short col, float **lat_gd, float **lon_gd, double areaFracBox[3][3], double areaBinbox[3][3])
Definition: l1c.cpp:15915
float * pol_agg
Definition: l1c.h:197
float lat0
Definition: l1c.h:190
virtual int32_t create_SOCEA(int swtd, L1C_input *l1cinput, l1c_filehandle *l1cfile, float **lat_gd, float **lon_gd)
Definition: l1c.cpp:4989
float minlon_img
Definition: l1c.h:148
int32_t across_gridlines_l1c_vec3(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, float *lati2, float *loni2, float **lat_gd, float **lon_gd, float *az_east)
virtual int32_t ect_vec(int swt, l1c_filehandle *l1cfile, std::vector< double > &tvect, std::vector< double > &latvec, std::vector< double > &lonvec, float *tcross, float *loncross)
Definition: l1c.cpp:487
size_t terrain_corrected
Definition: l1c.h:177
float unc_thres_p
Definition: l1c.h:205
virtual int32_t swtime_vec(int swtd, L1C_input *l1cinput, l1c_filehandle *l1cfile, int16_t time_index[6], std::vector< double > &tvec, double tcross, double mgv1, double *tmgv1)
Definition: l1c.cpp:348
bool binIntersectsPix2corn(int32_t row, int32_t col, double **lat_cgd, double **lon_cgd, Box_t &pixelBox, double &areaFrac)
virtual int32_t interp_swt_dist_vec(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, double *time_mgv, float *lati, float *loni, float *lati2, float *loni2)
Definition: l1c.cpp:21868
L1C()
Definition: l1c.cpp:79
virtual int32_t ect(l1c_filehandle *l1cfile)
Definition: l1c.cpp:24448
int32_t openL1Cgrid(int swtd, l1c_str *l1cstr, l1c_filehandle *l1cfile, L1C_input *l1cinput, int16_t *swtd_id, int16_t *file_id, int16_t *nfiles_swt, float **lat_gd, float **lon_gd, float *az_east, float **lat_asort, short **index_xy)
float unc_thres_b
Definition: l1c.h:206
float maxlat_img
Definition: l1c.h:147
virtual int32_t binL1C_wgranule3(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, int16_t *swtd_id, int16_t *odir, int16_t *file_id, int16_t *nfiles_swt)
Definition: l1c.cpp:13259
int32_t xy_pixsize(int swtd, l1c_filehandle *l1cfile, int16_t *swtd_id, int16_t *odir, int16_t *file_id, int16_t *nfiles_swt, float **binx_size_u, float **binx_size_v)
virtual bool sbs2_l1c(L1C_input *l1cinput, int32_t ydim, int32_t xdim, float **alat, short **alat_index, float latpix, float lonpix, float **lon_gd, short *erow, short *ecol)
Definition: l1c.cpp:5483
Definition: l1c.h:43
virtual int32_t across_gridlines_l1c(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, int16_t *swtd_id, int16_t *file_id, int16_t *nfiles_swt, float *lati3, float *loni3, float **lat_cgd, float **lon_cgd, float *az_east)
Definition: l1c.cpp:21420
virtual int32_t ect_sf(const char *filename, l1c_filehandle *l1cfilei, L1C_input *l1cinput)
Definition: l1c.cpp:24279
size_t npols
Definition: l1c.h:155
virtual ~L1C()
Definition: l1c.cpp:83
double binL1C_pixelpoly(l1c_filehandle *l1cfile, L1C_input *l1cinput, l1c_str *l1cstr, short gd_row, short gd_col, int32_t pix)
float unc_thres_v
Definition: l1c.h:204
size_t nband_swir
Definition: l1c.h:159
size_t cloud_corrected
Definition: l1c.h:178
virtual int32_t swtime_swt(int swt, L1C_input *l1cinput, l1c_filehandle *l1cfile, int32_t norbs, int16_t time_index[6], double *tswt, double tcross, double mgv, double *tmgv)
Definition: l1c.cpp:285
size_t nband_blue
Definition: l1c.h:157
int32_t xy_pixsize_sf2(const char *filename, l1c_filehandle *l1cfile, L1C_input *l1cinput, float **pix_size_u, float **pix_size_v, float **lat_gd, float **lon_gd, double **lat_cgd, double **lon_cgd, float **Ltfracsum, float **areabinsum, float **nobs_perbin)
size_t length
Definition: l1c.h:137
bool sbs2_l1c(L1C_input *l1cinput, int32_t ydim, int32_t xdim, float **alat, short **alat_index, float latpix, float lonpix, float **lon_gd, short *erow, short *ecol)
virtual int32_t across_gridlines_l1c2(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, int16_t *swtd_id, int16_t *file_id, int16_t *nfiles_swt, float *lati3, float *loni3, float **lat_cgd, float **lon_cgd, float *az_east)
Definition: l1c.cpp:20351
float res_spat
Definition: l1c.h:140
float * cloud_height
Definition: l1c.h:179
int32_t ect_sf2(const char *filename, L1C_input *l1cinput, l1c_filehandle *l1cfile)
virtual bool binIntersectsPix4corn3(short row, short col, double **lat_cgd, double **lon_cgd, Polygon_t &pixelPoly, double areaFracBox[3][3], double areabinBox[3][3])
Definition: l1c.cpp:3523
int32_t load_l1c_filehandle4(l1c_filehandle *l1cfile, L1C_input *l1cinput)
int32_t across_gridlines_l1c_vec(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, float *lati2, float *loni2, float **lat_gd, float **lon_gd, float *az_east)
virtual int32_t binL1C_wgranule6(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, int16_t *swtd_id, int16_t *odir, int16_t *file_id, int16_t *nfiles_swt)
Definition: l1c.cpp:11035
virtual int32_t binL1C_wgranule7(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, int16_t *swtd_id, int16_t *odir, int16_t *file_id, int16_t *nfiles_swt)
Definition: l1c.cpp:9682
int32_t binL1C_wgranule4(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, int16_t *swtd_id, int16_t *odir, int16_t *file_id, int16_t *nfiles_swt)
virtual bool binIntersectsPix2corn2(int32_t row, int32_t col, double **lat_cgd, double **lon_cgd, Box_t &pixelBox, double areaFracBox[3][3])
Definition: l1c.cpp:4685
int32_t swtime_swt(int swt, L1C_input *l1cinput, l1c_filehandle *l1cfile, int32_t norbs, int16_t time_index[6], double *tswt, double tcross, double mgv, double *tmgv)
int32_t pix_corners4_l1c(l1c_filehandle *l1cfile, L1C_input *l1cinput, float dist_u, float dist_v, float azpix, int32_t scanline, int32_t pix, float pixlat, float pixlon, float pixLt, float **lat_asort, short **index_xy, float **lat_gd, float **lon_gd, double **lat_cgd, double **lon_cgd, double areaFracBox[3][3], float **Ltfracsum, float **areabinsum, float **nobs_perbin)
std::vector< std::string > cust_l1cprod
Definition: l1c.h:132
virtual int32_t swtime_swt2(int swt, L1C_input *l1cinput, l1c_filehandle *l1cfile, int32_t norbs, double *tswt, double tcross, double mgv, double *tmgv)
Definition: l1c.cpp:214
int32_t mov_sd3(l1c_filehandle *l1cfile, L1C_input *l1cinput, double *tcross, int16_t *file_id, int16_t *swtd_id, int16_t *nfiles_swt, double *ect_swtd, int16_t *tod, int16_t *orbdir, float *mgv_swath)
char filename[FILENAME_MAX]
Definition: atrem_corl1.h:122
virtual int32_t binL1C_wgranule4(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, int16_t *swtd_id, int16_t *odir, int16_t *file_id, int16_t *nfiles_swt)
Definition: l1c.cpp:8575
virtual int32_t interp_swt1(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, int16_t *swtd_id, int16_t *file_id, int16_t *nfiles_swt, double *time_mgv, orb_array *velig, float *lati, float *loni)
Definition: l1c.cpp:22262
float * bbands
Definition: l1c.h:165
int32_t interp_swt_dist_vec(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, double *time_mgv, float *lati, float *loni, float *lati2, float *loni2)
size_t l1c_pflag
Definition: l1c.h:131
Definition: l1c.cpp:76
float maxlon_img
Definition: l1c.h:149
virtual int32_t open_l2tol1c(l1c_filehandle *l1cfile, L1C_input *l1cinput)
Definition: l1c.cpp:2267
size_t nscan
Definition: l1c.h:153
float * view_agg
Definition: l1c.h:196
size_t sensorID
Definition: l1c.h:138
file_type
Definition: filetype.h:11
virtual int32_t interp_swt_dist3(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, int16_t *swtd_id, int16_t *file_id, int16_t *nfiles_swt, double *time_mgv, float *lati, float *loni, float *lati2, float *loni2)
Definition: l1c.cpp:21975
virtual int32_t binL1C_wgranule_aw(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, int16_t *swtd_id, int16_t *odir, int16_t *file_id, int16_t *nfiles_swt)
Definition: l1c.cpp:7602
float res_spec
Definition: l1c.h:141
int32_t ect_vec(int swt, l1c_filehandle *l1cfile, std::vector< double > &tvect, std::vector< double > &latvec, std::vector< double > &lonvec, float *tcross, float *loncross)
file_type format
Definition: l1c.h:135
subroutine geometry
virtual int32_t azmean_swt2(int swt, L1C_input *l1cinput, l1c_filehandle *l1cfile, float *lati, float *loni)
Definition: l1c.cpp:106
virtual int32_t gwindowTopix_l1c(l1c_filehandle *l1cfile, L1C_input *l1cinput, short gd_row, short gd_col, float **lat_gd, float **lon_gd, double **latcornBox, double **loncornBox)
Definition: l1c.cpp:15296
virtual int32_t search_SOCEA(L1C_input *l1cinput, l1c_filehandle *l1cfile, float **lat_gd, float **lon_gd, double *time_mgv, float ect, float loncross)
Definition: l1c.cpp:5316
int32_t interp_swt_dist3(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, int16_t *swtd_id, int16_t *file_id, int16_t *nfiles_swt, double *time_mgv, float *lati, float *loni, float *lati2, float *loni2)
int32_t open_l1atol1c(L1C_input *l1cinput, l1c_filehandle *l1cfile)
float gres
Definition: l1c.h:187
bool binIntersectsPix4corn4_l1c(l1c_filehandle *l1cfile, L1C_input *l1cinput, short row, short col, float **lat_gd, float **lon_gd, Polygon_t &pixelPoly, double areaFracBox[3][3], double areabinBox[3][3])
size_t nbands
Definition: l1c.h:156
virtual int32_t pixcornBox(l1c_filehandle *l1cfile, L1C_input *l1cinput, float dist_u, float dist_v, float azpix, int32_t scanline, int32_t pix, float pixlat, float pixlon, float pixLt, short gd_row, short gd_col, float **lat_gd, float **lon_gd, Polygon_t &pixelPoly)
Definition: l1c.cpp:15833
float minlat_img
Definition: l1c.h:146
virtual int32_t interp_swt_dist2(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, int16_t *swtd_id, int16_t *file_id, int16_t *nfiles_swt, double *time_mgv, float *lati, float *loni, float *lati2, float *loni2)
Definition: l1c.cpp:22065
void sbs2_sort_latgd(l1c_filehandle *l1cfile, float **lat_gd, float **lat_asort, short **index_xy)
int32_t search_SOCEA(L1C_input *l1cinput, l1c_filehandle *l1cfile, float **lat_gd, float **lon_gd, double *time_mgv, float ect, float loncross)
int32_t binL1C_wgranule3(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, int16_t *swtd_id, int16_t *odir, int16_t *file_id, int16_t *nfiles_swt)
size_t sd_id
Definition: l1c.h:127
size_t pols[3]
Definition: l1c.h:164
virtual int32_t load_l1c_filehandle4(l1c_filehandle *l1cfile, L1C_input *l1cinput)
Definition: l1c.cpp:24585
virtual void search_rc_l1c(L1C_input *l1cinput, l1c_filehandle *l1cfile, float lat_pix, float lon_pix, double otime_pix, float lon_eqc, short *rowindex, short *colindex, short Nneg)
Definition: l1c.cpp:5364
bg::model::box< Point_t > Box_t
Definition: l1c.h:38
int32_t savebinL1C_v2(int swtd, L1C_input *l1cinput, l1c_filehandle *l1cfile, float **lat_gd, float **lon_gd, float **Ltfracsum, float **areafracsum, float **nobs_perbin)
size_t mode
Definition: l1c.h:136
float * views
Definition: l1c.h:163
int32_t azmean_swt2(int swt, L1C_input *l1cinput, l1c_filehandle *l1cfile, float *lati, float *loni)
virtual int32_t mov_sd4(l1c_filehandle *l1cfile, L1C_input *l1cinput, double *tcross, int16_t *file_id, int16_t *swtd_id, int16_t *nfiles_swt, double *ect_swtd, int16_t *tod, int16_t *orbdir, float *mgv_swath)
Definition: l1c.cpp:23256
virtual int32_t openL1Cgrid(int swtd, l1c_str *l1cstr, l1c_filehandle *l1cfile, L1C_input *l1cinput, int16_t *swtd_id, int16_t *file_id, int16_t *nfiles_swt, float **lat_gd, float **lon_gd, float *az_east, float **lat_asort, short **index_xy)
Definition: l1c.cpp:5655
int32_t across_gridlines_l1c(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, int16_t *swtd_id, int16_t *file_id, int16_t *nfiles_swt, float *lati3, float *loni3, float **lat_cgd, float **lon_cgd, float *az_east)
int32_t pixcornBox(l1c_filehandle *l1cfile, L1C_input *l1cinput, float dist_u, float dist_v, float azpix, int32_t scanline, int32_t pix, float pixlat, float pixlon, float pixLt, short gd_row, short gd_col, float **lat_gd, float **lon_gd, Polygon_t &pixelPoly)
void search_rc_l1c(L1C_input *l1cinput, l1c_filehandle *l1cfile, float lat_pix, float lon_pix, double otime_pix, float lon_eqc, short *rowindex, short *colindex, short Nneg)
bg::model::point< double, 2, bg::cs::geographic< bg::degree > > Point_t
Definition: l1c.h:36
virtual int32_t time_swt3(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, double *ect_d, int16_t *swtdid, int16_t *fileid, int16_t *nfiles_swt, float *mgv_swt, double *time_mgv)
Definition: l1c.cpp:22497
int32_t binL1C_wgranule6(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, int16_t *swtd_id, int16_t *odir, int16_t *file_id, int16_t *nfiles_swt)
int32_t gwindowTopix_l1c(l1c_filehandle *l1cfile, L1C_input *l1cinput, short gd_row, short gd_col, float **lat_gd, float **lon_gd, double **latcornBox, double **loncornBox)
size_t overlap_pflag
Definition: l1c.h:200
float * rbands
Definition: l1c.h:166
virtual bool binIntersectsPix4corn2(int32_t row, int32_t col, double **lat_cgd, double **lon_cgd, Polygon_t &pixelPoly, double areaFracBox[3][3])
Definition: l1c.cpp:4066
int32_t pix_corners4_l1c2(l1c_filehandle *l1cfile, L1C_input *l1cinput, float dist_u, float dist_v, float azpix, int32_t scanline, int32_t pix, float pixlat, float pixlon, float pixLt, short row, short col, float **lat_gd, float **lon_gd, double areaFracBox[3][3], double **Ltfracsum, double **areabinsum, float **nobs_perbin)
virtual int32_t binL1C_wgranule5(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, int16_t *swtd_id, int16_t *odir, int16_t *file_id, int16_t *nfiles_swt)
Definition: l1c.cpp:12218
virtual int32_t across_gridlines_l1c_vec3(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, float *lati2, float *loni2, float **lat_gd, float **lon_gd, float *az_east)
Definition: l1c.cpp:17296
int32_t mov_sd2(l1c_filehandle *l1cfile, L1C_input *l1cinput, double *tcross, int16_t *file_id, int16_t *swtd_id, int16_t *nfiles_swt, double *ect_swtd, int16_t *tod, int16_t *orbdir, float *mgv_swath)
bg::model::polygon< Point_t > Polygon_t
Definition: get_dataday.cpp:25
int32_t binL1C_wgranule2(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, int16_t *swtd_id, int16_t *odir, int16_t *file_id, int16_t *nfiles_swt)
bool binIntersectsPix4corn3(short row, short col, double **lat_cgd, double **lon_cgd, Polygon_t &pixelPoly, double areaFracBox[3][3], double areabinBox[3][3])
int16_t sday
Definition: l1c.h:145
virtual int32_t azmean_swt(int swt, L1C_input *l1cinput, l1c_filehandle *l1cfile, float *lati, float *loni)
Definition: l1c.cpp:162
virtual int32_t across_gridlines_l1c_vec(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, float *lati2, float *loni2, float **lat_gd, float **lon_gd, float *az_east)
Definition: l1c.cpp:19357
int32_t xy_pixsize_sf3(const char *filename, l1c_filehandle *l1cfile, L1C_input *l1cinput, float **pix_size_u, float **pix_size_v, float **lat_gd, float **lon_gd, double **lat_cgd, double **lon_cgd, float **Ltfracsum, float **areabinsum, float **nobs_perbin, float **lat_asort, short **index_xy)
int32_t interp_swt_dist2(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, int16_t *swtd_id, int16_t *file_id, int16_t *nfiles_swt, double *time_mgv, float *lati, float *loni, float *lati2, float *loni2)
size_t overlap_bflag
Definition: l1c.h:201
int32_t binL1C_sbs_line(int swtd, L1C *l1c, l1c_str *l1cstr, l1c_filehandle *l1cfile, L1C_input *l1cinput, int16_t *swtd_id, int16_t *file_id, int16_t *nfiles_swt, float **lat_gd, float **lon_gd, float *az_east, float **lat_asort, short **index_xy, float ****binLt, int ****bincount, size_t recnums, int granid)
size_t orb_dir
Definition: l1c.h:173
int32_t create_SOCEA(int swtd, L1C_input *l1cinput, l1c_filehandle *l1cfile, float **lat_gd, float **lon_gd)
bg::model::box< Point_t > Box_t
Definition: l1c.cpp:73
virtual int32_t mov_sd2(l1c_filehandle *l1cfile, L1C_input *l1cinput, double *tcross, int16_t *file_id, int16_t *swtd_id, int16_t *nfiles_swt, double *ect_swtd, int16_t *tod, int16_t *orbdir, float *mgv_swath)
Definition: l1c.cpp:23582
size_t proj_type
Definition: l1c.h:186
virtual int32_t mov_sd3(l1c_filehandle *l1cfile, L1C_input *l1cinput, double *tcross, int16_t *file_id, int16_t *swtd_id, int16_t *nfiles_swt, double *ect_swtd, int16_t *tod, int16_t *orbdir, float *mgv_swath)
Definition: l1c.cpp:22745
int32_t time_swt2(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, double *ect_d, int16_t *swtdid, int16_t *fileid, int16_t *nfiles_swt, float *mgv_swt, double *time_mgv)
int32_t interp_swt1(int swtd, l1c_filehandle *l1cfile, L1C_input *l1cinput, int16_t *swtd_id, int16_t *file_id, int16_t *nfiles_swt, double *time_mgvi, orb_array *velig, float *lati, float *loni)