Problem using ENVI/IDL ENVITask('BuildBandStack')

المشرف العام

Administrator
طاقم الإدارة
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)

أكثر...
 
أعلى