Hi, I want to add an ENVI Tool in ArcToolbox so that I can perform Landsat Gap Fill in ArcGIS without opening ENVI. I have written a python script (LandsatGapfill.py) to call 'LandsatGapfill.sav' from ArcMap. python script is mentioned below: # Python Code example for calling an ENVI DOIT Routine import arcgisscripting, envipy # Get input raster inRasterName = arcpy.GetParameterAsText(0) # Get output raster outRasterName = arcpy.GetParameterAsText(1) # IDL procedure name in the SAVE file for this tool toolname = 'LandsatGapfill' # Execute ENVI custom tool # If the save file is not in the same directory as this python # file, then you will need to add a full path to the save file e.g., # Library = r'c:\savefiles\MyEnviTool.sav' envipy.RunTool(toolname, inRasterName, outRasterName, Library=r'LandsatGapfill.sav') I put 'LandsatGapfill.py' and 'LandsatGapfill.sav' both file in a same folder (GapfillTool) in C drive I have added tool in ArcToolbox using the properties mentioned below: Source file = LandsatGapfill.py Parameter: Input Raster = Raster Layer; Output Raster = Raster Dataset When I tried to run the Tool it is giving an error message, which is given below: Executing: myscript D:\Landsat\test.dat D:\Landsat\pp Start Time: Mon Aug 29 16:56:05 2011 Running script myscript... Starting ENVI process. STRING = 'Attempt to call undefined procedure/function: 'LANDSATGAPFILL'.' Completed script myscript... Failed to execute (myscript). Failed at Mon Aug 29 16:57:14 2011 (Elapsed Time: 1 minutes 9 seconds) Please help me so that I can perform Landsat Gapfill in ArcGIS Regards, Partha Ghosh
|