X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 16 Jan 2016 03:08 PM by  anon
Batch Processing MTL's
 3 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
16 Jan 2016 03:08 PM
    I need to process multiband MTL.txt files in a program that produces tif files from them that have reflectance data. The reflectance program only processes one MTL file at a time. I would like to batch process all MTL files in a folder, or several folders if possible. Similar to the proposition in this thread: http://www.exelisvis.com/...s/Default.aspx#17162 How can I apply my program to the batch processing in the program in that thread?

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    18 Jan 2016 10:46 AM
    Here is a good example using ENVITask: http://www.exelisvis.com/Home/NewsUpd...

    Deleted User



    New Member


    Posts:
    New Member


    --
    18 Jan 2016 12:41 PM
    I think I understand everything in the code until the foreach loop that I have pasted below. As a reminder, I need to run a program I have that converts every MTL and Panchromatic file to a tif that has reflectance values for all the bands. Is "Execute" the program name in the code below? If not, how do I tell the batch program to run my reflectance.pro? foreach file, filelist, index do begin raster = e.OpenRaster(file) task.input_raster = raster task.output_raster_uri = outbase + strtrim(index, 2) task.Execute endforeach

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    18 Jan 2016 01:01 PM
    The foreach statement goes through the list of files to process them in the specified task. Execute in this example will run (execute) the task (radiometric calibration) and output the file to reflectance (or radiance depending on what you choose). Then you will need to use another task (ENVIRaster::Export) to export the ENVI format file to TIFF. Radiometric calibration to TOA reflectance: http://www.exelisvis.com/docs/ENVIRad... Note that because Landsat MTL files have more than one dataset (Pan+MS), you will need to choose which dataset to process and loop through each one to get both the Pan and MS file calibrated. Export to TIFF: http://www.exelisvis.com/docs/ENVIRas...
    You are not authorized to post a reply.