Removes one or more raster datasets from 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


; Start the application
e = ENVI()
 
; Get a couple of raster files
file1 = FILEPATH('qb_boulder_msi', ROOT_DIR=e.ROOT_DIR, $
  SUBDIRECTORY = ['data'])
file2 = FILEPATH('qb_boulder_pan', ROOT_DIR=e.ROOT_DIR, $
  SUBDIRECTORY = ['data'])
 
; Instantiate a new temporary catalog
catalog = ENVICatalog()
 
; This will print 0
print, catalog.n_entries
 
; Add the rasters to the catalog
catalog.AddRaster, [file1, file2]
 
; This will print 2
print, catalog.n_entries
 
; Remove one.
catalog.RemoveRaster, file1
 
; This will print 1
print, catalog.n_entries
 
; Remove the other.
catalog.RemoveRaster, file2
 
; This will print 0
print, catalog.n_entries

Syntax


ENVICatalog.RemoveRaster, Argument [, ERROR=value]

Arguments


Argument

Specify one or more ENVIRaster objects or URI strings for the raster(s) to remove.

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::AddRaster