X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 10 Aug 2015 10:35 AM by  anon
Problem with ENVITask BuildBandStack
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
10 Aug 2015 10:35 AM
    I am trying to stack 2 bands together from 2 different landsat images using ENVITask('BuildBandStack'). These are landsat images from two different years, and Band 1 in both years. When I run my code though a debugging arrow pops up at the ENVITask('BuildBandStack') line of code shown below, and I am not sure why. The code I am using is: ; Start the application e = ENVI() ; Select 1st Landsat Band File1 = 'F:\Sheyenne\Atmospherically Corrected Landsat\Sheyenne_main_clip\LT50300281984137PAC00_sr_band1_clip.tif' Raster1 = e.OpenRaster(File1) ; Select 2nd Landsat Band File2 = 'F:\Sheyenne\Atmospherically Corrected Landsat\Sheyenne_main_clip\LT50300281984185XXX15_sr_band1_clip.tif' Raster2 = e.OpenRaster(File2) ; Get the task from the catalog of ENVITasks Task = ENVITask('BuildBandStack') ; Define inputs Task.INPUT_RASTERS = [Raster1, Raster2] ; Define outputs Task.OUTPUT_RASTER_URI = e.GetTemporaryFilename() ; Run the task Task.Execute ; Get the data collection DataColl = e.Data ; Add the output to the data collection DataColl.Add, Task.OUTPUT_RASTER ; Display the result View1 = e.GetView() Layer1 = View1.CreateLayer(Task.OUTPUT_RASTER) EDIT: I have ENVI 5.1, maybe this task is not available in 5.1...

    Zachary Norman



    Basic Member


    Posts:173
    Basic Member


    --
    10 Aug 2015 12:36 PM
    Hi Stefano, The BuildBandStack Task became available in ENVI 5.2 and you can tell what version of the software it is released in at the bottom of each documentation page (http://www.exelisvis.com/docs/ENVIBui...). Envi 5.3 and IDL 8.5 were just released and can be accessed via web downloads on your account page. I would suggest looking into upgrading to the most recent versions of IDL and ENVI for bug fixes and many more tasks available within ENVI 5.3
    You are not authorized to post a reply.