This task retrieves the value of a given raster metadata key.

Example


; Launch the application
e = ENVI(/HEADLESS)
 
; Create an ENVIRaster       
File = FILEPATH('qb_boulder_msi', ROOT_DIR=e.ROOT_DIR, $
  SUBDIRECTORY = ['data'])
Raster = e.OpenRaster(File)
 
; Get the task from the catalog of ENVITasks
Task = ENVITask('RasterMetadataItem')
 
; Define inputs
Task.INPUT_RASTER = Raster
Task.KEY = 'wavelength'
 
; Run the task
Task.Execute
 
; Print its value
PRINT, Task.VALUE.VALUE

IDL prints:

485.00000       560.00000       660.00000       830.00000

Syntax


Result = ENVITask('RasterMetadataItem')

Input parameters (Set, Get): INPUT_RASTER, KEY

Output parameters (Get only): VALUE

Parameters marked as "Set" are those that you can set to specific values. You can also retrieve their current values any time. Parameters marked as "Get" are those whose values you can retrieve but not set.

Input Parameters


INPUT_RASTER (required)

Specify an raster to retrieve a metadata item from.

KEY (required)

Specify the string key of the metadata to retrieve. See ENVI Header Fields for a list of metadata tags in ENVI-format rasters.

Output Parameters


VALUE

The value of the specified metadata key.

Methods


Execute

Parameter

ParameterNames

Properties


DESCRIPTION

DISPLAY_NAME

NAME

REVISION

TAGS

Version History


ENVI 5.3

Introduced

See Also


ENVITask, EditRasterMetadata Task, ENVISpectralLibrary, QuerySpectralLibrary Task, ResampleSpectrum Task, ENVIGetSpectrumFromLibrary