Hexagon Geospatial
MENU

Spatial Modeler Tutorials

Learn more about our products, find answers, get the latest updates, and connect with other Hexagon Geospatial product users, or get support from our professional service team.
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 (4,693 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

 

 

Comments
by Technical Evangelist
on ‎08-14-2017 05:23 AM

Hi Emana,

 

No screenshots came through so I'm unsure what model you are trying to run or what the problems are. Can you please describe the state of the data you are trying to process, what model you are trying to run and what messages you might be seeing in the Messages pane.

 

Cheers

 

by kansy
on ‎08-14-2017 06:34 AM

Dear Ian

 

Thank you for your mail.

 

I am not dealing with stacking landsat tar.gz files anymore

 

I was trying to use teh spatual model created for me by Mvardovs.

 

I have successfully done that and I have now run the model.

 

 

 

Thanks

Courses
Contributors