[Python] GDAL_MERGE.PY TIFFReadEncodedTile() and Decoding error

Discussão em 'Python' iniciado por Stack, Maio 16, 2025.

  1. Stack

    Stack Membro Participativo

    I downloaded some .tif files from EarthEpxloration. I am tasked to take it from Landsat 9 and also to use surface reflectance bands. Settings are shown below:

    Setting 1

    Setting 2

    Setting 3

    Using anaconda in my virtual environment - which has GDAL installed in it (ver=3.6.2), I am trying to merge .tif files via

    python "C:\Users\XXX\anaconda3\envs\venv\Scripts\gdal_merge.py" -separate -o merged.tif LC09_L2SP_043033_20250128_20250129_02_T1_SR_B4.TIF LC09_L2SP_043033_20250128_20250129_02_T1_SR_B3.TIF LC09_L2SP_043033_20250128_20250129_02_T1_SR_B2.TIF


    Yes, I am using the full file path to gdal_merge.py because I cannot use this term itself, otherwise the terminal won't recognize it as a command.

    I receive this output in the terminal:

    GDAL Merge Error

    As you can see, there are errors when trying to merge it. By doing some research and asking Copilot, they both say that it's a corrupt file that it's trying to merge and therefore the error to it.

    What is your thought on it? And could you suggest a possible solution for me to solve this?

    Thanks a bunch!

    Continue reading...

Compartilhe esta Página