Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate Variables in MTL #10

Open
micha-silver opened this issue Apr 24, 2022 · 2 comments
Open

Duplicate Variables in MTL #10

micha-silver opened this issue Apr 24, 2022 · 2 comments

Comments

@micha-silver
Copy link

Using the L1C2 (collection 2) Landsat 8, the MTL files now contain some variables twice. When the addon parses this MTL, it fails with "Duplicate Variable ORIGIN" etc. for each such variable

Here's a list of the duplicates that I found:

diff LC08_L1TP_174039_20220118_20220123_02_T1_MTL.txt LC08_L1TP_174039_20220118_20220123_02_T1_MTL.txt.bak 
113a114,115
>     ORIGIN = "Image courtesy of the U.S. Geological Survey"
>     DIGITAL_OBJECT_IDENTIFIER = "https://doi.org/10.5066/P975CC9B"
115a118,121
>     LANDSAT_PRODUCT_ID = "LC08_L1TP_174039_20220118_20220123_02_T1"
>     PROCESSING_LEVEL = "L1TP"
>     COLLECTION_CATEGORY = "T1"
>     OUTPUT_FORMAT = "GEOTIFF"
117a124,143
>     FILE_NAME_BAND_1 = "LC08_L1TP_174039_20220118_20220123_02_T1_B1.TIF"
>     FILE_NAME_BAND_2 = "LC08_L1TP_174039_20220118_20220123_02_T1_B2.TIF"
>     FILE_NAME_BAND_3 = "LC08_L1TP_174039_20220118_20220123_02_T1_B3.TIF"
>     FILE_NAME_BAND_4 = "LC08_L1TP_174039_20220118_20220123_02_T1_B4.TIF"
>     FILE_NAME_BAND_5 = "LC08_L1TP_174039_20220118_20220123_02_T1_B5.TIF"
>     FILE_NAME_BAND_6 = "LC08_L1TP_174039_20220118_20220123_02_T1_B6.TIF"
>     FILE_NAME_BAND_7 = "LC08_L1TP_174039_20220118_20220123_02_T1_B7.TIF"
>     FILE_NAME_BAND_8 = "LC08_L1TP_174039_20220118_20220123_02_T1_B8.TIF"
>     FILE_NAME_BAND_9 = "LC08_L1TP_174039_20220118_20220123_02_T1_B9.TIF"
>     FILE_NAME_BAND_10 = "LC08_L1TP_174039_20220118_20220123_02_T1_B10.TIF"
>     FILE_NAME_BAND_11 = "LC08_L1TP_174039_20220118_20220123_02_T1_B11.TIF"
>     FILE_NAME_QUALITY_L1_PIXEL = "LC08_L1TP_174039_20220118_20220123_02_T1_QA_PIXEL.TIF"
>     FILE_NAME_QUALITY_L1_RADIOMETRIC_SATURATION = "LC08_L1TP_174039_20220118_20220123_02_T1_QA_RADSAT.TIF"
>     FILE_NAME_ANGLE_COEFFICIENT = "LC08_L1TP_174039_20220118_20220123_02_T1_ANG.txt"
>     FILE_NAME_ANGLE_SENSOR_AZIMUTH_BAND_4 = "LC08_L1TP_174039_20220118_20220123_02_T1_VAA.TIF"
>     FILE_NAME_ANGLE_SENSOR_ZENITH_BAND_4 = "LC08_L1TP_174039_20220118_20220123_02_T1_VZA.TIF"
>     FILE_NAME_ANGLE_SOLAR_AZIMUTH_BAND_4 = "LC08_L1TP_174039_20220118_20220123_02_T1_SAA.TIF"
>     FILE_NAME_ANGLE_SOLAR_ZENITH_BAND_4 = "LC08_L1TP_174039_20220118_20220123_02_T1_SZA.TIF"
>     FILE_NAME_METADATA_ODL = "LC08_L1TP_174039_20220118_20220123_02_T1_MTL.txt"
>     FILE_NAME_METADATA_XML = "LC08_L1TP_174039_20220118_20220123_02_T1_MTL.xml"
248a275,282
>     MAP_PROJECTION = "UTM"
>     DATUM = "WGS84"
>     ELLIPSOID = "WGS84"
>     UTM_ZONE = 36
>     GRID_CELL_SIZE_PANCHROMATIC = 15.00
>     GRID_CELL_SIZE_REFLECTIVE = 30.00
>     GRID_CELL_SIZE_THERMAL = 30.00
>     ORIENTATION = "NORTH_UP"

After removing these duplicates from the MTL, I was able to successfully run the addon.

@NikosAlexandris
Copy link
Owner

Micha, this was on the MTL file only, right?

@micha-silver
Copy link
Author

Yes, the MTL file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants