GBDX

ENVI® Query Spectral Indices

This task returns the spectral indices that can be computed for a given input raster, based on its wavelength metadata. The output is a JSON file that lists the available indices, based on the bands available in the image file.

GBDX Registered Name: ENVI_QuerySpectralIndices
Provider: Harris Geospatial Solutions

Imagery Examples

This image shows the image file and the JSON output list from ENVI Query Spectral Index

This image shows the image file and the JSON output list from ENVI Query Spectral Index

Quickstart

This is a workflow example for basic processing.

# Quickstart Example running the task name.

# Initialize the Environment.
from os.path import join, split
from gbdxtools import Interface
gbdx = Interface()

tasks = []
output_location = 'ENVI/QuerySpectralIndices'

cat_id = '105001000672E000'

# Image Auto ordering task parameters
order = gbdx.Task("Auto_Ordering")
order.inputs.cat_id = cat_id
order.impersonation_allowed = True
order.persist = True
order.timeout = 36000
tasks += [order]

# Image AOP task parameters
aop = gbdx.Task("AOP_Strip_Processor")
aop.inputs.data = order.outputs.s3_location.value
aop.inputs.bands = 'MS'
aop.inputs.enable_dra = False
aop.outputs.data.persist = True
aop.outputs.data.persist_location = output_location+'/aop'
aop.timeout = 36000
tasks += [aop]

# Create a basic classification
envi_query = gbdx.Task("ENVI_QuerySpectralIndices")
envi_query.inputs.input_raster = aop.outputs.data.value
tasks += [envi_query]

workflow = gbdx.Workflow(tasks)
workflow.savedata(
    envi_query.outputs.available_indices, location=output_location
)
workflow.savedata(
    envi_query.outputs.task_meta_data, location=output_location
)

workflow.execute()

Inputs

The following table lists all ENVI_QuerySpectralIndices inputs.
Mandatory (optional) settings are listed as Required = True (Required = False).

Name Required Default Valid Values Description
file_types False N/A string GBDX Option. Comma seperated list of permitted file type extensions. Use this to filter input files -- Value Type: STRING[*]
input_raster True N/A See ENVIRASTER input type Specify a raster to query for available spectral indices. -- Value Type: ENVIRASTER
input_raster_format False N/A See ENVIRASTER input type Provide the format of the image, for example: landsat-8. -- Value Type: STRING
input_raster_band_grouping False N/A See ENVIRASTER input type Provide the name of the band grouping to be used in the task, ie - panchromatic. -- Value Type: STRING
input_raster_filename False N/A See ENVIRASTER input type Provide the explicit relative raster filename that ENVI will open. This overrides any file lookup in the task runner. -- Value Type: STRING

Outputs

The following table lists all ENVI_QuerySpectralIndices outputs.
Mandatory (optional) settings are listed as Required = True (Required = False).

Name Required Default Valid Values Description
task_meta_data False N/A directory GBDX Option. Output location for task meta data such as execution log and output JSON
available_indices True N/A string A string array with the spectral indices that can be computed for the input raster. -- Value Type: STRINGARRAY

Output structure

The output of this task is a string port listing the available indices, based on the bands available in the image file. This port can be used to chain to another task. Alternatively, the output is written to a JSON file in the task_meta_data port, where the list can be found after the Task completes.

Issues

Additional parsing of the output list of indices is necessary before using the list as input for the ENVI Spectral Indices task.

Background

For additional background information on this task please refer to the Harris Geospatial ENVI documentation and
ENVI® Query Spectral Indices.

Contact

If you have any questions or issues with this task, please contact gbdx-support@digitalglobe.com.