>  Docs Center  >  ENVI API  >  Processing  >  ENVIRasterMetadataItemTask

ENVIRasterMetadataItemTask

ENVIRasterMetadataItemTask

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 properties (Set, Get): INPUT_RASTER, KEY

Output properties (Get only): VALUE

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

Methods


This task inherits the following methods from ENVITask:

AddParameter

Execute

Parameter

ParameterNames

RemoveParameter

Properties


This task inherits the following properties from ENVITask:

COMMUTE_ON_DOWNSAMPLE

COMMUTE_ON_SUBSET

DESCRIPTION

DISPLAY_NAME

NAME

REVISION

TAGS

This task also contains the following properties:

INPUT_RASTER (required)

Specify an raster to retrieve a metadata item from.

KEY (required)

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

VALUE

The value of the specified metadata key.

Version History


ENVI 5.3

Introduced

API Version


3.3

See Also


ENVITask, ENVITask::Parameter, ENVISpectralLibrary, ENVIQuerySpectralLibraryTask, ENVIResampleSpectrumTask, ENVIGetSpectrumFromLibrary



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us