This model was designed to work with downloadable USGS Landsat files(.tar.gz). It will automatically unzip the original .tar.gz into a newly created folder, without changing any naming conventions. As such it emulates the initial steps of the USGS Landsat importers provided in ERDAS IMAGINE. However it is important to note that this model does not attempt to create multispectral layerstacks from the unpacked files - it simply unpacks the archive.
When the model is run, the .tar.gz is first unpacked to a new folder within the containing directory with the suffix .tar. The second step of this model is to unpack the .tar file. This will have the same root naming convention as the input .tar.gz without that extension. Once the .tar extraction is completed, the intermediate .tar directory is deleted. The original input .tar.gz file will remain as is and all files extracted into a directory with the same root name as the .tar.gz.
Using the ERDAS IMAGINE 2016 Flow Control improvements, additional session log messages are added during key steps in the model. For example once a file extraction is complete a custom session log message is added using the pattern: “Extraction FROM $INPUT TO $OUTPUT COMPLETE”. Likewise, when all files have been extracted the intermediate .tar directory is deleted and reported in the session log as: “Deleting Directory: $INPUT”
An additional benefit of this model is to work as a template for many other Command Line operations.
Input Directory: User defined input directory. Assumes this directory contains at least one .tar.gz file
Include sub-directories?: True or False option. By default this is set as True. If True, the model will parse through all sub-directories of the input directory and include any .tar.gz files within these in the model. If this is set to false, no .tar.gz files under any sub-directories of the input directory will be used in the model.
C:\Data\Landsat8.tar.gz > All files will be extracted into the folder C:\Data\Landsat8 Folder.
With sub-directories set to true, all sub-directories containing .tar.gz files will also be parsed through the model. For example a directory input of C:\Data\ will also run on a .tar.gz contained in a sub-directory such as C:\Data\Temp\Landsat8.tar.gz.
While the intermediate .tar file is deleted, the original input .tar.gz file will remain.
As mentioned above, this model does not attempt to create multispectral layerstacks from the unpacked files. Such functionality could be easily added within the Iterator using something like this: