Batch processing Landsat images on Windows

Frequently Asked Questions
Post Reply
Majid
Posts: 2
Joined: Fri May 08, 2020 5:26 pm

Batch processing Landsat images on Windows

Post by Majid »

Hi,
I have downloaded several Landsat-8/9 images from Earth Explorer as Level-1 data. I want to batch process all of the them.
I am using the "ACOLITE 20231023.0" for Windows. I have found information about the batch processing (viewtopic.php?t=29) but it is for an earlier version of ACOLITE.
How I can batch process usning the current version?
Thanks
-Majid
quinten
Posts: 1010
Joined: Tue Mar 03, 2015 8:13 am

Re: Batch processing Landsat images on Windows

Post by quinten »

Hi Majid

If you want to run the binary in batch mode, you'll have to run inside "cmd.exe" or another terminal emulator, and change directory to the acolite_py_win directory.

You can make a list of the files in a text file, and then pass it to ACOLITE with a command line interface run. Provide a full path to the scenes, each on a new line:

Code: Select all

\path\to\image1
\path\to\image2
\path\to\image3
Make sure to also pass along some settings, e.g. with an output path, region of interest, and other options you want to change from the defaults specified:

Code: Select all

dist\acolite\acolite.exe --cli --settings user_settings.txt --inputfile scene_list.txt
You can also specify the scene list directly as comma separated values:

Code: Select all

dist\acolite\acolite.exe --cli --settings user_settings.txt --inputfile \path\to\image1,\path\to\image2,\path\to\image3
You could also put the comma separated values inside your user settings file, and run:

Code: Select all

dist\acolite\acolite.exe --cli --settings user_settings.txt
Finally, you can also make a bat file and execute that, for example:

Code: Select all

SET acolite_dir=\path\to\acolite_py_win
SET settings=\path\to\user_settings.txt
SET images="\path\to\image1,\path\to\image2,\path\to\image3"

@ECHO OFF
cd %acolite_dir%
for %%i in (%images%) do (
 echo Processing %%i
 dist\acolite\acolite.exe --cli --settings=%settings% --inputfile=%%i
 echo/
)
ECHO Batch completed.
PAUSE
I hope this helps!

Quinten
Majid
Posts: 2
Joined: Fri May 08, 2020 5:26 pm

Re: Batch processing Landsat images on Windows

Post by Majid »

Many thank Quinten, it works.
Post Reply