Hexagon Geospatial
MENU

ERDAS IMAGINE

Discuss and share topics of interest using ERDAS IMAGINE the world’s leading geospatial data authoring system.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Contributor
Posts: 65
Registered: ‎01-04-2017

Batch Command Editor doesn’t run as expected for “Import Landsat 4, 5, 7, or 8 from USGS”

Hi,

I am trying to import Landsat 8 USGS. Tar.Gz files in batch., but after clicking “Run Now”

It doesn’t run, remains ideal for ever, sometimes works on some files and fails to run on other added files in batch.

I tried importing both a single and multiple.tar.gz files, it is same. Below is the Snap Shots:

 

"See Attached"

 

However, while trying to regenerate the problem for this post, this time I found some files are properly imported, but some got stucked for ever.

 

I tried importing the files one by one manually which were not imported in the above batch process, I encountered the below problem:

 

"See Attached"

 

When I checked the temp directory I found the below .tar file

 

"See Attached"

 

When I examined the .tar file found the below files in it:

 

"See Attached"

 

That means all the bands and files are not being extracted from the original.tr.gz files

 

Any solution to the above problem will be highly appreciated.

 

Best Regards,

RSGIS

Frequent Contributor
Posts: 82
Registered: ‎01-20-2016

Re: Batch Command Editor doesn’t run as expected for “Import Landsat 4, 5, 7, or 8 from USGS”

Hi RSGIS,

 

I could successfully import Landsat 8 imagery, but I have only three datasets available.

 

It is not clear to me which settings you are choosing for "Variables". I used "One Input, one or more outputs".

 

BatchImportLandsat.png

 

 My saved bcf-file has the following syntax:

/*
** IMAGINE Version 16.5 Batch Commands File
*/
variable Input1 User;
variable Output1 Auto "d:/workshop_batch/$(Input1.root)_msi.img" Delete_Before;
variable Output2 Auto "d:/workshop_batch/$(Input1.root)_tir.img" Delete_Before;
variable Output3 Auto "d:/workshop_batch/$(Input1.root)_pan.img" Delete_Before;
variable Output4 Auto "d:/workshop_batch/$(Input1.root)_msitir.img" Delete_Before;
variable Output5 Auto "d:/workshop_batch/$(Input1.root)_qa.img" Delete_Before;
variable Output6 Auto "d:/workshop_batch/$(Input1.root)_cirrus.img" Delete_Before;

importusgsl7 -inputfilename '$(Input1)' -tardir e:/temp/ -temptardir -msioutputfilename '$(Output1)' -msigm -tiroutputfilename '$(Output2)' -tirgm -panoutputfilename '$(Output3)' -pangm -msitiroutputfilename '$(Output4)' -msitirgm -qaoutputfilename '$(Output5)' -cirrusoutputfilename '$(Output6)'

Maybe your temp folder should point to another folder? I chose E:/Temp for instance.

 

Ruth

 

Contributor
Posts: 65
Registered: ‎01-04-2017

Re: Batch Command Editor doesn’t run as expected for “Import Landsat 4, 5, 7, or 8 from USGS”

Hi Ruth,

 

Thanks, I used "One Input, one or more outputs" but I tried all, in the attachement herewith, I exhibited all settings and error messages.

 

Mean time I was investigating myself, that the .tar.gz file which were not imported doesn't contain all 11 bands and MTL file, which I indicated in the attached exhibit.

 

Some .tar.gz has 7 bands, some 8, some 9 and some 10 bands. which I checked in the Temp directory and also with WinRar program. But even though all bands are no there, It has atleaset 7 bands, so I expect the BATCH to import Multispectral Data (MSI). 

 

Is thre some possibilites  that the Import / Batch process has bug, that it couldn't process those .tar.gz which doesn't has all 11 bands or metadeta file ?

 

Thanks

RSGIS

Frequent Contributor
Posts: 82
Registered: ‎01-20-2016

Re: Batch Command Editor doesn’t run as expected for “Import Landsat 4, 5, 7, or 8 from USGS”

My files do have 11 bands.......?!?

 

Ruth

Frequent Contributor
Posts: 82
Registered: ‎01-20-2016

Re: Batch Command Editor doesn’t run as expected for “Import Landsat 4, 5, 7, or 8 from USGS”

Hi RSGIS,

 

I made another test using Landsat 7 which has 9 bands.

 

The dialogue is not offering QA and Cirrus data as output, which is clear. If you try to import mixed Landsat Sensors within one batch I would recommend to uncheck both options.

The second problem I found is that as soon as I change variables to "One input, one or  more outputs", Variables are set to input instead of output.

/*
** IMAGINE Version 16.5 Batch Commands File
*/
variable Input1 User;
variable Input2 User;
variable Input3 User;
variable Input4 User;
variable Output1 Auto "e:/test_batch/$(Input1.root)_le71920262001238edc00-msitir.img" Delete_Before;

importusgsl7 -inputfilename '$(Input1)' -tardir e:/temp/ -temptardir -msioutputfilename '$(Input2)' -msigm -tiroutputfilename '$(Input3)' -tirgm -panoutputfilename '$(Input4)' -pangm -msitiroutputfilename '$(Output1)' -msitirgm

I suppose this is wrong behaviour but might be avoided if you choose a Landsat 8 image for the batch setup. But I am not sure.

 

Ruth

Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.