Skip to content

Commit 25238ad

Browse files
committed
adapt L2PS to L9
1 parent 5f8b6b9 commit 25238ad

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/lower-level/meta-ll.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ GDALDatasetH fp_;
314314
lid = atoi(tokenptr+strlen(tokenptr)-1);
315315

316316
// set datatype, saturation value, and number of bands
317-
if (lid == 8){
317+
if (lid >= 8){
318318
meta->dtype = 16;
319319
meta->sat = 65535;
320320
nb = 9;
@@ -350,6 +350,9 @@ GDALDatasetH fp_;
350350
case 8:
351351
b_rsr = _RSR_START_LND08_;
352352
break;
353+
case 9:
354+
b_rsr = _RSR_START_LND09_;
355+
break;
353356
default:
354357
printf("unknown satellite. ");
355358
return FAILURE;
@@ -360,7 +363,7 @@ GDALDatasetH fp_;
360363
#endif
361364

362365
b = 0;
363-
if (lid == 8){
366+
if (lid >= 8){
364367

365368
copy_string(meta->cal[b].orig_band, NPOW_03, "1");
366369
meta->cal[b].rsr_band = b_rsr++;
@@ -1377,7 +1380,6 @@ printf("there are still some things to do int meta. checking etc\n");
13771380
switch (mission){
13781381
case LANDSAT:
13791382
if (parse_metadata_landsat(pl2, meta, DN) != SUCCESS) return FAILURE;
1380-
13811383
break;
13821384
case SENTINEL2:
13831385
if (parse_metadata_sentinel2(pl2, meta, DN) != SUCCESS) return FAILURE;

src/lower-level/table-ll.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ const int _RSR_START_LND04_ = 0;
106106
const int _RSR_START_LND05_ = 7;
107107
const int _RSR_START_LND07_ = 14;
108108
const int _RSR_START_LND08_ = 21;
109+
const int _RSR_START_LND09_ = 21; // quick fix
109110
const int _RSR_START_SEN2A_ = 30;
110111
const int _RSR_START_SEN2B_ = 43;
111112

src/lower-level/table-ll.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ extern const int _RSR_START_LND04_;
4141
extern const int _RSR_START_LND05_;
4242
extern const int _RSR_START_LND07_;
4343
extern const int _RSR_START_LND08_;
44+
extern const int _RSR_START_LND09_;
4445
extern const int _RSR_START_SEN2A_;
4546
extern const int _RSR_START_SEN2B_;
4647
extern const float _RSR_[56][1991];

0 commit comments

Comments
 (0)