X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 22 Jul 2016 09:52 AM by  anon
ENVIMosaicRaster
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:3
New Member


--
22 Jul 2016 09:52 AM
    I am trying to mosaic several non-overlapping rasters together (they have same number of bands and same pixel sixe etc). I used the seamless mosaic tool in the envi gui and it worked great. When I tried to execute the ENVIMosaicRaster (https://www.harrisgeospatial.com/docs...) in IDL I got the error message "Mosaic raster input scenes are missing or invalid". During a different run I also got the error "ENVI::OPENRASTER: ENVI has not started." Any help/insights would be greatly appreciated! I used the code: PRO MOSAICBATCH2 COMPILE_OPT IDL2 ; Start the application e = ENVI(/HEADLESS) ; Select input scenes files = FILE_SEARCH('/gpfs/data/mike/lindb/WNV/WELD/temp/summer/' + '*.tif', count=count) print, count scenes = !NULL FOR i=0, N_ELEMENTS(files)-1 DO BEGIN raster = e.OpenRaster(files[i]) scenes = [scenes, raster] ENDFOR ; Create the mosaic raster mosaicRaster = ENVIMosaicRaster(scenes) ; Save it as ENVI format newFile = e.GetTemporaryFilename() mosaicRaster.Export, newFile, 'ENVI' ; Close the ENVI session e.Close END

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    22 Jul 2016 10:59 AM
    I ran the below code with the mosaic tutorial data set and it ran to completion with no errors, so I don't think it is the code. What version of ENVI are you using? I tested with ENVI 5.3 SP1. Do you get a count of the files that it found? Can you print the filenames? I think the second error may occur in a failed run if the mosaic is not closed. Are you running ENVI Classic at the same time?
    You are not authorized to post a reply.