Who rated this article

Showing results for 
Search instead for 
Do you mean 

Landsat Stacking from .tar.gz archives

by Technical Evangelist on ‎08-02-2017 12:36 PM - edited on ‎02-24-2020 03:27 AM by Community Manager (5,763 Views)

Download model

 

sterling_geo_logo_new.png

 

Description:

 

 

Based on the articles "Commandline Iterator - Extract Landsat TarGz Files in Batch" and "Stack Landsat8 MSI" our partner in the UK, Sterling Geo, has come up with a very interesting and useful Spatial Model capable of unpacking the .tar.gz archive files commonly used when downloading Landsat archived data, whether or not it is for Landsat 5, 7 or 8, and creating layer-stacked images. Here are the details:

 

This model is capable of unzipping and stacking all Landsat 5, 7 or 8 format files in a folder (new or old USGS format).

 

The only inputs required are the input and output directory and whether or not to output the cloud (BQA bands and cirrus) or Panchromatic data. It will then loop through all tar.gz files in the input directory and create stacked and automatically named image files in the output directory.

 

Landsat_Import_Stack_Run.PNG

 

Firstly the model identifies which Landsat format the file is in, running only if that type exists.

 

Landsat_ImportZip_all_files_in_directory.gmdx
Landsat_Import_Stack.PNG

 

Then the unzipping operation runs to extract the individual tiff files from the tar.gz.This community post was used to add the unzipping functionality. "Commandline Iterator - Extract Landsat TarGz Files in Batch"

 

Note that if you did not install ERDAS IMAGINE into the default path, you may need to dig into the Model and change the location of the un zipping program, as described in the linked article.

 

Next the extracted folder is used in a stacking sub model, stacking the bands into a msitir image (and the optional Pan and BQA images). The output multispectral images are named using the metadata file into; Landsat(5/7/8)_WRSpathWRSrow_Date Acquired(_pan/_cloud).img.

 

 

Landsat type

Bands used

Optional outputs

Landsat 5

Bands stacked: 1 to 7

BQA (Collection 1 only)

Landsat 7

Bands stacked: 1-7 including thermal

BQA (Collection 1 only) and panchromatic option

Landsat 8

Bands stacked: 1-7, 10, 11 

BQA and panchromatic option

 

 

Who rated this article