Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


  >  Docs Center  >  ENVI API  >  Processing  >  ENVIQuerySpectralIndicesTask

ENVIQuerySpectralIndicesTask

ENVIQuerySpectralIndicesTask

This task returns a string array of the spectral indices that can be computed for a given input raster, based on its wavelength metadata. Issue the PRINT command on the AVAILABLE_INDICES property (see code example) or open the Data Manager in the user interface to see the list of available indices.

Example


; Start the application
e = ENVI()
 
; Open an input file
File = Filepath('qb_boulder_msi', Subdir=['data'], $
  Root_Dir=e.Root_Dir)
Raster = e.OpenRaster(File)
 
; Process a spatial subset
Subset = ENVISubsetRaster(Raster, Sub_Rect=[600,200,799,399])
 
; Get the task from the catalog of ENVITasks
Task = ENVITask('QuerySpectralIndices')
 
; Define inputs
Task.INPUT_RASTER = Subset
 
; Run the task
Task.Execute
 
; Get the task from the catalog of ENVITasks
Task2 = ENVITask('SpectralIndices')
 
; Define inputs
Task2.INPUT_RASTER = Subset
Task2.INDEX = Task.AVAILABLE_INDICES
 
; Run the task
Task2.Execute
 
; Get the collection of data objects currently available in the Data Manager
DataColl = e.Data
 
; Add the output to the Data Manager
DataColl.Add, Task2.OUTPUT_RASTER
 
; Display the result
View1 = e.GetView()
Layer1 = View1.CreateLayer(Task2.OUTPUT_RASTER)
 
; Print the available indices to the
; ENVI command line
Print, Task.AVAILABLE_INDICES

Syntax


Result = ENVITask('QuerySpectralIndices')

Input properties (Set, Get): INPUT_RASTER

Output properties (Get only): AVAILABLE_INDICES

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:

AVAILABLE_INDICES

A string array with the spectral indices that can be computed for the input raster.

INPUT_RASTER (required)

Specify a raster to query for available spectral indices.

Version History


ENVI 5.2

Introduced

API Version


3.2

See Also


ENVITask, ENVITask::Parameter, ENVISpectralIndexRaster, ENVISpectralIndexTask, ENVISpectralIndicesTask, ENVISubsetRaster



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