This procedure imports a raster dataset into an ArcGIS File or Enterprise geodatabase, using an ArcGIS catalog path. ENVI_OUTPUT_TO_GDB does not support importing vector data into a geodatabase.





The file ID (FID) is a long-integer scalar with a value greater than 0. An invalid FID has a value of -1. The FID is provided as a named variable by any routine used to open or select a file. Often, the FID is returned from the keyword R_FID in the ENVIRasterToFID routine. Files are processed by referring to their FIDs. If you work directly with the file in IDL, the FID is not equivalent to a logical unit number (LUN).


Set this keyword to a string that represents a catalog path.

A catalog path is one that ArcGIS recognizes; it includes the name of the geodatabase plus a raster dataset within the geodatabase. Set CatalogPath to a string value. Following are some examples of valid catalog paths.

ArcGIS File geodatabase:

Local: 'C:\data\core\CoreGeodatabase10.gdb\S068W013d_Clip'

Universal Naming Convention (UNC) path: '\\ags10\data\CoreGeodatabase10.gdb\S068W013d_clip'

ArcGIS Enterprise geodatabase:

ArcCatalog: 'Database Connections\ags10-sde.sde\sde.sde.s068w013d_Clip'

Local: 'C:\Documents and Settings\user\Application Data\Esri\Desktop10.0\ArcCatalog\ags10-sde.sde\sde.sde.s068w013d_Clip'

UNC path: '\\ags10\data\ags10-sde.sde\sde.sde.s068w013d_clip'


PRO example_output_to_gdb
     compile_opt idl2
  ; First restore all the base save files.
  envi, /restore_base_save_files
  ; Initialize ENVI in the batch mode   
  ; and send all errors and warnings
  ; to the file batch.txt.
  envi_batch_init, log_file='batch.txt'
  ; Open the input file 
     filename = filepath('bhtmref.img', $
              root=envi_get_path(), subdir=['data'])
     envi_open_file, filename, r_fid=fid
  ; Write the raster image to a file geodatabase
     envi_output_to_gdb, $
        out_name='c:\data\mydataset.gdb\bhtmref', $
  ; Exit ENVI

Any errors are written to a log file if you are running in batch mode with logging enabled.

API Version