OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
l1_l5tm.c
Go to the documentation of this file.
1 #include <stdlib.h>
2 #include <stdio.h>
3 
4 #include <netcdf.h>
5 #include "l1.h"
6 #include "l1_l5tm.h"
7 
8 #include <tiffio.h>
9 #include <geotiff.h>
10 #include <xtiffio.h>
11 #include <geo_normalize.h>
12 #include <libgen.h>
13 
14 /* For Landsat 5 TM */
15 
16 static const int itemSize = 500;
17 static const int maxBands = 7;
18 
19 typedef struct L5TM_struct {
20  int32_t year, doy, msec;
22  double *lat, *lon;
23  double *scale, *offset;
24  /* double *refl_scale, *refl_offset; */ // not available for Landsat 5 TM
25  TIFF** tif; // file handle for each band
26  GTIF* gtif; // geotiff handle for the first file
27  GTIFDefn* defn; // geotiff definition structure for first file
28  uint8_t* buf; // buffer used to read one scan line from TIFF file
29 } l5tm_t;
30 
31 
32 l5tm_t* createPrivateData_l5tm(int numBands) {
33  l5tm_t* data = (l5tm_t*)calloc(1, sizeof(l5tm_t));
34  if(data == NULL) {
35  fprintf(stderr,"-E- %s line %d: unable to allocate private data for L5TM\n",
36  __FILE__,__LINE__);
37  exit(1);
38  }
39 
40  data->scale = (double *) malloc(numBands*sizeof(double) );
41  data->offset = (double *) malloc(numBands*sizeof(double) );
42  if(data->scale==NULL || data->offset==NULL) {
43  fprintf(stderr,"-E- %s line %d: unable to allocate scale/offset data for L5TM\n",
44  __FILE__,__LINE__);
45  exit(1);
46  }
47 
48  /* data->refl_scale = (double *) malloc(numBands*sizeof(double) );
49  data->refl_offset = (double *) malloc(numBands*sizeof(double) );
50  if(data->refl_scale==NULL || data->refl_offset==NULL) {
51  fprintf(stderr,"-E- %s line %d: unable to allocate reflectance scale/offset data for L5TM\n",
52  __FILE__,__LINE__);
53  exit(1);
54  } */
55 
56  data->tif = (TIFF**) calloc(numBands, sizeof(TIFF*) );
57  if(data->tif==NULL) {
58  fprintf(stderr,"-E- %s line %d: unable to allocate TIFF pointers for L5TM\n",
59  __FILE__,__LINE__);
60  exit(1);
61  }
62 
63  data->defn = (GTIFDefn*) malloc(sizeof(GTIFDefn) );
64  if(data->defn==NULL) {
65  fprintf(stderr,"-E- %s line %d: unable to allocate GEOTIFF definition structure for L5TM\n",
66  __FILE__,__LINE__);
67  exit(1);
68  }
69 
70  return data;
71 }
72 
73 void freePrivateData_l5tm(l5tm_t* data) {
74  free(data->scale);
75  free(data->offset);
76  /* free(data->refl_scale);
77  free(data->refl_offset); */
78  free(data->tif);
79  free(data->defn);
80  free(data);
81 }
82 
83 void readNextLine_l5tm(FILE* fp, char* tag, int* i, char* val) {
84  char* result;
85  char line[itemSize];
86  int count;
87 
88  result = fgets(line, itemSize, fp);
89  if(result == NULL) {
90  fprintf(stderr,"-E- %s line %d: unable to read all of the required metadata from L5TM file\n",
91  __FILE__,__LINE__);
92  exit(1);
93  }
95 
96  count = sscanf(line, "%s = %s", tag, val);
97  if(count != 2) {
98  // not found so return blank line
99  tag[0] = 0;
100  *i = 0;
101  val[0] = 0;
102  return;
103  }
104 
105  // grab index if it exists
106  result = strrchr(tag, '_');
107  if(result) {
108  result++;
109  *i = atoi(result);
110  } else {
111  *i = 0;
112  }
113 
114  // get rid of the quotes from val
115  if(val[0] == '"')
116  val[0] = ' ';
117  count = strlen(val) - 1;
118  if(val[count] == '"')
119  val[count] = 0;
120  trimBlanks(val);
121 }
122 
123 
124 int read_l5tm_angles(char *file, int32_t npix, int32_t nscan, int32_t iscan,
125  float *solz, float *sola, float *senz, float *sena) {
126 
127  static int firstCall = 1;
128  static int fileID;
129 
130  int retval;
131  int xid, yid, varID=-1;
132  size_t geo_npix, geo_nscan;
133  size_t start[3], count[3];
134 
135  if (firstCall) {
136 
137  firstCall = 0;
138 
139  printf("Reading path angles from %s.\n",file);
140 
141  // Open the netcdf file
142  retval = nc_open(file, NC_NOWRITE, &fileID);
143  if (retval != NC_NOERR) {
144  fprintf(stderr, "-E- %s line %d: nc_open(%s) failed.\n",
145  __FILE__, __LINE__, file);
146  return (-1);
147  }
148 
149  // Get pixel and scan dimensions
150  retval = nc_inq_dimid(fileID, "Pixels", &xid);
151  retval = nc_inq_dimid(fileID, "Lines" , &yid);
152  retval = nc_inq_dimlen(fileID, xid, &geo_npix);
153  retval = nc_inq_dimlen(fileID, yid, &geo_nscan);
154 
155  if (retval != NC_NOERR) {
156  fprintf(stderr, "-E- %s line %d: Error reading dimensions from %s.\n",
157  __FILE__, __LINE__, file);
158  return (-1);
159  }
160  if (geo_npix != npix || geo_nscan != nscan) {
161  fprintf(stderr, "-E- %s line %d: geofile dimensions (%zu,%zu) do not match image dimensions (%d,%d).\n",
162  __FILE__, __LINE__, geo_npix,geo_nscan,npix,nscan);
163  return (-1);
164  }
165 
166  }
167 
168  start[0] = iscan;
169  start[1] = 0;
170  count[0] = 1;
171  count[1] = npix;
172 
173  retval = nc_inq_varid(fileID, "solz", &varID);
174  if (retval == NC_NOERR)
175  retval = nc_get_vara_float(fileID, varID, start, count, solz);
176  if (retval != NC_NOERR) {
177  fprintf(stderr,
178  "-E- %s line %d: Unable to read solz from %s.\n",
179  __FILE__, __LINE__, file);
180  return (-1);
181  }
182 
183  retval = nc_inq_varid(fileID, "sola", &varID);
184  if (retval == NC_NOERR)
185  retval = nc_get_vara_float(fileID, varID, start, count, sola);
186  if (retval != NC_NOERR) {
187  fprintf(stderr,
188  "-E- %s line %d: Unable to read sola from %s.\n",
189  __FILE__, __LINE__, file);
190  return (-1);
191  }
192 
193  retval = nc_inq_varid(fileID, "senz", &varID);
194  if (retval == NC_NOERR)
195  retval = nc_get_vara_float(fileID, varID, start, count, senz);
196  if (retval != NC_NOERR) {
197  fprintf(stderr,
198  "-E- %s line %d: Unable to read senz from %s.\n",
199  __FILE__, __LINE__, file);
200  return (-1);
201  }
202 
203  retval = nc_inq_varid(fileID, "sena", &varID);
204  if (retval == NC_NOERR)
205  retval = nc_get_vara_float(fileID, varID, start, count, sena);
206  if (retval != NC_NOERR) {
207  fprintf(stderr,
208  "-E- %s line %d: Unable to read sena from %s.\n",
209  __FILE__, __LINE__, file);
210  return (-1);
211  }
212 
213  return(0);
214 }
215 
216 
217 int openl1_l5tm(filehandle *file) {
218  int i;
219  FILE *fp;
220  char tag[itemSize];
221  char val[itemSize];
222  char dateStr[32];
223  char timeStr[32];
224  char fileName[itemSize];
225 
226  l5tm_t* data = file->private_data = createPrivateData_l5tm(maxBands);
227 
228  if(want_verbose)
229  printf("L5TM Level-1B %s\n", file->name );
230 
231  /* Open file */
232  if ((fp = fopen(file->name, "r")) == NULL) {
233  fprintf(stderr,"-E- %s line %d: unable open %s\n",
234  __FILE__,__LINE__,file->name);
235  exit(1);
236  }
237 
238  int dateNeeded = 1;
239  int timeNeeded = 1;
240  int filesNeeded = 1;
241  int numLinesNeeded = 1;
242  int numSamplesNeeded = 1;
243  int sunAzimuthNeeded = 1;
244  int sunElevationNeeded = 1;
245  int scaleNeeded = 1;
246  int offsetNeeded = 1;
247  /* int reflScaleNeeded = 1;
248  int reflOffsetNeeded = 1; */
249 
250  // loop metadata
251  while(dateNeeded ||
252  timeNeeded ||
253  numLinesNeeded ||
254  numSamplesNeeded ||
255  filesNeeded ||
256  sunAzimuthNeeded ||
257  sunElevationNeeded ||
258  /* reflScaleNeeded ||
259  reflOffsetNeeded || */
260  scaleNeeded ||
261  offsetNeeded) {
262 
263  readNextLine_l5tm(fp, tag, &i, val);
264 
265  // skip blank lines
266  if(tag[0] == 0)
267  continue;
268 
269  // get date
270  if(!strcmp(tag, "DATE_ACQUIRED")) {
271  dateNeeded = 0;
272  strcpy(dateStr, val);
273 
274  // get time
275  } else if(!strcmp(tag, "SCENE_CENTER_TIME")) {
276  timeNeeded = 0;
277  strcpy(timeStr, val);
278 
279  // get num lines
280  } else if(!strcmp(tag, "REFLECTIVE_LINES")) {
281  numLinesNeeded = 0;
282  file->nscan = atoi(val);
283 
284  // get num samples
285  } else if(!strcmp(tag, "REFLECTIVE_SAMPLES")) {
286  numSamplesNeeded = 0;
287  file->npix = atoi(val);
288 
289 
290  // get band file names
291  } else if(!strncmp(tag, "FILE_NAME_BAND_", 15)) {
292  if(i == maxBands)
293  filesNeeded = 0;
294  i--;
295  if(i>=0 && i<maxBands) {
296  // dirname might destroy input, so we pass it a copy
297  char dir[FILENAME_MAX];
298  strcpy(dir,file->name);
299  strcpy(fileName, dirname(dir));
300  strcat(fileName, "/");
301  strcat(fileName, val);
302  if(want_verbose)
303  printf("L5TM Level-1B Band[%d]:%s\n", i, fileName );
304  data->tif[i] = XTIFFOpen(fileName, "r");
305  if (!data->tif[i]) {
306  fprintf(stderr,"-E- %s line %d: unable open TIFF file %s\n",
307  __FILE__,__LINE__,fileName);
308  exit(1);
309  }
310  }
311 
312  // get sun azimuth
313  } else if(!strcmp(tag, "SUN_AZIMUTH")) {
314  sunAzimuthNeeded = 0;
315  data->sunAzimuth = atof(val);
316 
317  // get sun elevation
318  } else if(!strcmp(tag, "SUN_ELEVATION")) {
319  sunElevationNeeded = 0;
320  data->sunElevation = atof(val);
321 
322  // get refl_scale
323  } /* else if(!strncmp(tag, "REFLECTANCE_MULT_BAND_", 22)) {
324  if(i == maxReflBands)
325  reflScaleNeeded = 0;
326  i--;
327  if(i>=0 && i<maxReflBands) {
328  data->refl_scale[i] = atof(val);
329  }
330 
331  // get refl_offset
332  } else if(!strncmp(tag, "REFLECTANCE_ADD_BAND_", 21)) {
333  if(i == maxReflBands)
334  reflOffsetNeeded = 0;
335  i--;
336  if(i>=0 && i<maxReflBands) {
337  data->refl_offset[i] = atof(val);
338  }
339 
340  } */
341  // radiance scale
342  else if(!strncmp(tag, "RADIANCE_MULT_BAND_", 19)) {
343  if(i == maxBands)
344  scaleNeeded = 0;
345  i--;
346  if(i>=0 && i<maxBands) {
347  data->scale[i] = atof(val);
348  }
349 
350  // get offset
351  } else if(!strncmp(tag, "RADIANCE_ADD_BAND_", 18)) {
352  if(i == maxBands)
353  offsetNeeded = 0;
354  i--;
355  if(i>=0 && i<maxBands) {
356  data->offset[i] = atof(val);
357  }
358  }
359 
360  } // while
361 
362  fclose(fp);
363 
364  // allocate lat and lon storage
365  data->lat = (double *) malloc(file->npix*sizeof(double) );
366  data->lon = (double *) malloc(file->npix*sizeof(double) );
367  if(data->lat==NULL || data->lon==NULL) {
368  fprintf(stderr,"-E- %s line %d: unable to allocate lat/lon data for L5TM\n",
369  __FILE__,__LINE__);
370  exit(1);
371  }
372 
373  // only need the GEO TIFF info from one file
374  data->gtif = GTIFNew(data->tif[0]);
375  if (!data->gtif) {
376  fprintf(stderr,"-E- %s line %d: unable open GEOTIFF file %s\n",
377  __FILE__,__LINE__,fileName);
378  exit(1);
379  }
380 
381  if(!GTIFGetDefn(data->gtif, data->defn)) {
382  fprintf(stderr,"-E- %s line %d: unable populate GEOTIFF defn structure for %s\n",
383  __FILE__,__LINE__,fileName);
384  exit(1);
385  }
386 
387  // allocate buffer to hold one scan line
388  int size = TIFFScanlineSize(data->tif[0]);
389  if(size != file->npix) /* For Landsat 5 TM the data type is Byte */
390  {
391  fprintf(stderr,"-E- %s line %d: unexpected pixel data size in %s\n",
392  __FILE__,__LINE__,fileName);
393  exit(1);
394  }
395  data->buf = (uint8_t*) malloc(size);
396 
397  // get date "2013-07-19"
398  int year, month, day;
399  sscanf(dateStr, "%d-%d-%d", &year, &month, &day);
400 
401  // get time "10:41:59.9930740Z"
402  int hour, minute;
403  double sec;
404  sscanf(timeStr, "%d:%d:%lf", &hour, &minute, &sec);
405 
406  int isec = (int)sec;
407  ymdhms2ydmsec(year, month, day, hour, minute, isec,
408  &data->year, &data->doy, &data->msec);
409  sec -= isec;
410  data->msec += sec * 1000;
411 
412  if(want_verbose) {
413  printf("L5TM Start Time: %4d-%02d-%02d %03d %02d:%02d:%f\n",
414  year, month, day, data->doy, hour, minute, sec);
415 
416  printf("L5TM file has %d bands, %d samples, %d lines\n",
417  file->nbands, file->npix, file->nscan );
418  }
419  strcpy(file->spatialResolution,"30 m");
420 
421  return 0;
422 }
423 
424 int readl1_l5tm( filehandle *file, int recnum, l1str *l1rec, int lonlat) {
425  int ip, ib, ipb;
426  l5tm_t* data = (l5tm_t*)file->private_data;
427 
428  // set information about data
429  l1rec->npix = file->npix;
430  l1rec->l1file->sensorID = file->sensorID;
431  l1rec->scantime = yds2unix((int16_t) data->year, (int16_t) data->doy,
432  (double) (data->msec / 1000.0 ));
433 
434  // get lat-lon
435  for (ip=0; ip<file->npix; ip++) {
436  data->lon[ip] = ip;
437  data->lat[ip] = recnum;
438  GTIFImageToPCS(data->gtif, data->lon+ip, data->lat+ip);
439  }
440 
441  if (!GTIFProj4ToLatLong(data->defn, file->npix, data->lon, data->lat) ) {
442  fprintf(stderr,"-E- %s line %d: unable reproject points for scan %d\n",
443  __FILE__,__LINE__,recnum);
444  exit(1);
445  }
446 
447  for (ip=0; ip<file->npix; ip++) {
448 
449  l1rec->pixnum[ip] = ip;
450 
451  if ( isnan(data->lat[ip]) )
452  data->lat[ip] = -999.0;
453  if ( isnan(data->lon[ip]) )
454  data->lon[ip] = -999.0;
455  l1rec->lat[ip] = data->lat[ip];
456  l1rec->lon[ip] = data->lon[ip];
457 
458  /* printf("lat = %f, lon = %f\n", l1rec->lat[ip], l1rec->lon[ip]); */
459 
460  if (l1rec->lon[ip] < -181.0 || l1rec->lon[ip] > 181.0 ||
461  l1rec->lat[ip] < -91.0 || l1rec->lat[ip] > 91.0 )
462  {
463  l1rec->navfail[ip] = 1;
464  printf("ERROR: lat = %f, lon = %f\n", l1rec->lat[ip], l1rec->lon[ip]);
465  }
466 
467  }
468 
469  if (lonlat)
470  return(LIFE_IS_GOOD);
471 
472  // read path angles if user supplied, else use best guess
473 
474  /* For Landsat 5 this IS the only option
475  * if (file->geofile == NULL || file->geofile[0] == 0)
476  { */
477  if (get_l57tm_nom_angles(file->name,file->npix,file->nscan,recnum,l1rec->solz,l1rec->sola,l1rec->senz,l1rec->sena) == -1) {
478  fprintf(stderr, "-E- %s line %d: missing or incompatible geofile\n",
479  __FILE__,__LINE__);
480  exit(1);
481  /* } */
482 
483  }
484  /* not sure if for Landsat 5 enhanced metadata file (EMD) is even available so commented out
485  *
486  * else {
487  if (chk_l5tm_geo(file->geofile) != FT_L5TML1B) {
488  printf("Exit get_oli_angles with error\n");
489  fprintf(stderr, "-E- %s line %d: non-existent or incompatible geofile.\n-E- File specified must be an Enhanced Meta-Data file (EMD format)\n",
490  __FILE__,__LINE__);
491  exit(1);
492  }
493  if ( get_oli_angles(file->geofile,file->npix,file->nscan,recnum,l1rec->solz,l1rec->sola,l1rec->senz,l1rec->sena) == -1) {
494  printf("Exit get_oli_angles with error\n");
495  fprintf(stderr, "-E- %s line %d: missing or incompatible geofile\n",
496  __FILE__,__LINE__);
497  exit(1);
498  }
499  } */
500 
501  for(ib = 0; ib < file->nbands; ib++)
502  {
503 
504  /* For Landsat 5 skip band 6 */
505  if (ib == 5)
506  {
507  if(TIFFReadScanline(data->tif[ib+1], (void*)data->buf, recnum, 0) == -1) {
508  fprintf(stderr, "-E- %s line %d: Failed to read Lt, band %d, recnum %d\n",
509  __FILE__,__LINE__, ib, recnum );
510  exit(1);
511  }
512  }
513  else
514  {
515  if(TIFFReadScanline(data->tif[ib], (void*)data->buf, recnum, 0) == -1) {
516  fprintf(stderr, "-E- %s line %d: Failed to read Lt, band %d, recnum %d\n",
517  __FILE__,__LINE__, ib, recnum );
518  exit(1);
519  }
520  }
521 
522  for (ip=0; ip<file->npix; ip++) {
523  ipb = ip*file->nbands+ib;
524  if(data->buf[ip] == 0) {
525  l1rec->Lt[ipb] = BAD_FLT; // I assume this is outside the projected tile
526  l1rec->navfail[ip] = 1; // so set navigation failure
527  } else
528  {
529  /* For Landsat 5 skip band 6 */
530  if (ib == 5)
531  {
532  l1rec->Lt[ipb] = (data->buf[ip] * data->scale[ib+1] + data->offset[ib+1]) / 10.0;
533  /* printf("band = %d, scale = %f, offset = %f\n", ib+1, data->scale[ib+1], data->offset[ib+1]);
534  printf("buf = %d, final = %f\n", data->buf[ip], l1rec->Lt[ipb]); */
535  }
536  else
537  {
538  l1rec->Lt[ipb] = (data->buf[ip] * data->scale[ib] + data->offset[ib]) / 10.0;
539  /* printf("band = %d, scale = %f, offset = %f\n", ib, data->scale[ib], data->offset[ib]);
540  printf("buf = %d, final = %f\n", data->buf[ip], l1rec->Lt[ipb]); */
541  }
542 
543  }
544  }
545  }
546 
547  // read Cirrus Band 9
548 
549  /* ib = 8;
550  if(TIFFReadScanline(data->tif[ib], (void*)data->buf, recnum, 0) == -1) {
551  fprintf(stderr, "-E- %s line %d: Failed to read cirrus band, recnum %d\n",
552  __FILE__,__LINE__, recnum );
553  exit(1);
554  }
555 
556  for (ip=0;ip<file->npix; ip++) {
557  if(data->buf[ip] == 0)
558  l1rec->rho_cirrus[ip] = BAD_FLT;
559  else
560  l1rec->rho_cirrus[ip] = (data->buf[ip] * data->refl_scale[ib] + data->refl_offset[ib])
561  / cos(l1rec->solz[ip]/RADEG);
562 
563  } */
564 
565  return 0;
566 }
567 
568 int closel1_l5tm(filehandle *file) {
569  int ib;
570  l5tm_t* data = (l5tm_t*) file->private_data;
571 
572  // undo what open allocated
573  free(data->lat);
574  free(data->lon);
575  data->lat = data->lon = NULL;
576 
577  free(data->buf);
578  data->buf = NULL;
579 
580  GTIFFree(data->gtif);
581  data->gtif = NULL;
582 
583  for(ib=0; ib<file->nbands; ib++) {
584  XTIFFClose(data->tif[ib]);
585  }
587  file->private_data = NULL;
588 
589  return 0;
590 }
void freePrivateData_l5tm(l5tm_t *data)
Definition: l1_l5tm.c:73
int32_t day
double yds2unix(int16_t year, int16_t day, double secs)
Definition: yds2unix.c:7
double * offset
Definition: l1_l5tm.c:23
void readNextLine_l5tm(FILE *fp, char *tag, int *i, char *val)
Definition: l1_l5tm.c:83
int32_t year
Definition: l1_l5tm.c:20
int16_t fileID
#define NULL
Definition: decode_rs.h:63
int closel1_l5tm(filehandle *file)
Definition: l1_l5tm.c:568
read l1rec
double * scale
Definition: l1_l5tm.c:23
void trimBlanks(char *str)
Definition: trimBlanks.c:10
double sunAzimuth
Definition: l1_l5tm.c:21
double sunElevation
Definition: l1_l5tm.c:21
int32 nscan
Definition: l1_czcs_hdf.c:19
no change in intended resolving MODur00064 Corrected handling of bad ephemeris attitude resolving resolving GSFcd00179 Corrected handling of fill values for[Sensor|Solar][Zenith|Azimuth] resolving MODxl01751 Changed to validate LUT version against a value retrieved from the resolving MODxl02056 Changed to calculate Solar Diffuser angles without adjustment for estimated post launch changes in the MODIS orientation relative to incidentally resolving defects MODxl01766 Also resolves MODxl01947 Changed to ignore fill values in SCI_ABNORM and SCI_STATE rather than treating them as resolving MODxl01780 Changed to use spacecraft ancillary data to recognise when the mirror encoder data is being set by side A or side B and to change calculations accordingly This removes the need for seperate LUTs for Side A and Side B data it makes the new LUTs incompatible with older versions of the and vice versa Also resolves MODxl01685 A more robust GRing algorithm is being which will create a non default GRing anytime there s even a single geolocated pixel in a granule Removed obsolete messages from seed file
Definition: HISTORY.txt:413
GTIF * gtif
Definition: l1_l5tm.c:26
#define LIFE_IS_GOOD
Definition: passthebuck.h:4
read recnum
subroutine lonlat(alon, alat, xlon, ylat)
Definition: lonlat.f:2
int read_l5tm_angles(char *file, int32_t npix, int32_t nscan, int32_t iscan, float *solz, float *sola, float *senz, float *sena)
Definition: l1_l5tm.c:124
TIFF ** tif
Definition: l1_l5tm.c:25
int32_t doy
Definition: l1_l5tm.c:20
int want_verbose
double * lon
Definition: l1_l5tm.c:22
int get_l57tm_nom_angles(char *meta_filename, int32_t npix, int32_t nscan, int32_t iscan, float *solz, float *sola, float *senz, float *sena)
no change in intended resolving MODur00064 Corrected handling of bad ephemeris attitude data
Definition: HISTORY.txt:356
int readl1_l5tm(filehandle *file, int recnum, l1str *l1rec, int lonlat)
Definition: l1_l5tm.c:424
#define BAD_FLT
Definition: jplaeriallib.h:19
void ymdhms2ydmsec(int yy, int mm, int dd, int hh, int mn, int sc, int32_t *year, int32_t *day, int32_t *msec)
Definition: ydhms2ydmsec.c:3
int32_t iscan
double * lat
Definition: l1_l5tm.c:22
uint8_t * buf
Definition: l1_l5tm.c:28
l5tm_t * createPrivateData_l5tm(int numBands)
Definition: l1_l5tm.c:32
int i
Definition: decode_rs.h:71
GTIFDefn * defn
Definition: l1_l5tm.c:27
msiBandIdx val
Definition: l1c_msi.cpp:34
How many dimensions is the output array Default is Not sure if anything above will work correctly strcpy(l2prod->title, "no title yet")
int32_t msec
Definition: l1_l5tm.c:20
#define maxBands
int npix
Definition: get_cmp.c:27
int openl1_l5tm(filehandle *file)
Definition: l1_l5tm.c:217
int count
Definition: decode_rs.h:79