This method has been deprecated. Please refer to ENVIRasterMetadata.

The CreateRasterMetadata function method creates a new, empty ENVIRasterMetadata object that is not associated with an ENVIRaster object.

Creating an ENVIRasterMetadata object is useful for quickly defining metadata to apply to ENVIRaster objects.

Example


In this example, we create a blank ENVIRasterMetadata object and add some metadata fields.

; Launch the application
e = ENVI()
 
; Create an ENVIRasterMetadata object
metadata = e.CreateRasterMetadata()
 
; Add some metadata to the object
metadata.AddItem, 'Author', 'JDoe'
metadata.AddItem, 'default stretch', '5.0% linear'

Syntax


Result = ENVI.CreateRasterMetadata([ERROR=variable])

Return Value


This method returns a reference to a new, empty ENVIRasterMetadata object.

Keywords


Keywords are applied only during the initial creation of the object.

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 5

Introduced

ENVI 5.1

Deprecated

See Also


ENVI function, ENVIRasterMetadata, ENVIRaster