This method adds one or more raster datasets to the catalog. The input argument accepts a single ENVIRaster object, an array of ENVIRaster objects, a valid file path string, or an array of file path strings.

Example


; Get a raster file
file = FILEPATH('qb_boulder_msi', ROOT_DIR=e.ROOT_DIR, $
  SUBDIRECTORY = ['data'])
 
; Instantiate a new temporary catalog
catalog = ENVICatalog()
 
; This will print 0
print, catalog.n_entries
 
; Add the raster to the catalog
catalog.AddRaster, file
 
; This will print 1
print, catalog.n_entries

Syntax


Result = ENVICatalog.AddRaster([, ERROR=value])

Return Value


This method returns the fixed port used by the shared catalog server.

Arguments


Argument

One or more ENVIRaster objects or URI strings.

Keywords


ERROR

Set this keyword to a named variable that will contain any error message issued during execution of this routine. If no error occurs, the ERROR variable will be set to a null string (''). If an error occurs and the routine is a function, then the function result will be undefined.

When this keyword is not set and an error occurs, ENVI returns to the caller and execution halts. In this case, the error message is contained within !ERROR_STATE and can be caught using IDL's CATCH routine. See IDL Help for more information on !ERROR_STATE and CATCH.

See Manage Errors for more information on error handling in ENVI programming.

Version History


ENVI 6.3

Introduced

See Also


ENVICatalog, ENVICatalog::RemoveRaster, ENVI Catalog Background and Troubleshooting, ENVI Catalog, ENVIRaster