ENVI® Binary Morphological Filter

This task performs binary morphological filtering on an ENVIRaster.

GBDX Registered Name: ENVI_BinaryMorphologicalFilter
Provider: Harris Geospatial Solutions

Table of Contents

Section Description
Imagery Examples Before and after examples.
Quickstart Get started with a Python-based quickstart tutorial.
Inputs Required and optional task inputs.
Outputs Task outputs and example contents.
Known Issues Issues users should be aware of.
Contact Contact information.

Imagery Examples

Before: WorldView 3 Pan imagery

Before: WorldView 3 Pan imagery

After: Output from ENVI Binary Morphological Filtering.

After: Output from ENVI Binary Morphological Filtering.


This is a workflow example for basic processing.

# Quickstart Example running the task name.

# Initialize the Environment.
from gbdxtools import Interface
gbdx = Interface()

tasks = []
cat_id = '103001006FB33600'
aop_output_location = 'ENVI/Binary_Morphological_Filter/aop/'
task_output_location = 'ENVI/Binary_Morphological_Filter/task/'

# 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
order_data_loc = order.outputs.s3_location.value

# AOP task parameters (PAN Only)
aop_task = gbdx.Task("AOP_Strip_Processor") = order_data_loc
aop_task.inputs.enable_acomp = False
aop_task.inputs.enable_dra = False
aop_task.inputs.enable_pansharpen = False
aop_task.inputs.bands = 'PAN'
aop_task_output =

# ENVI Image thresholding parameters
envi_threshold_task = gbdx.Task('ENVI_BinaryGTThresholdRaster')
envi_threshold_task.inputs.input_raster = aop_task_output
envi_threshold_task.inputs.threshold = '[250]'
envi_threshold_task_output = envi_threshold_task.outputs.output_raster_uri.value

# ENVI Binary Morphological Filter parameters
envi_binary_morph_task = gbdx.Task('ENVI_BinaryMorphologicalFilter')
envi_binary_morph_task.inputs.input_raster = envi_threshold_task_output
envi_binary_morph_task.inputs.method = 'Erode'

# Set up workflow save data
workflow = gbdx.Workflow(tasks)
workflow.savedata(, location=aop_output_location)
workflow.savedata(envi_threshold_task.outputs.output_raster_uri, location=task_output_location+"threshold/")
workflow.savedata(envi_binary_morph_task.outputs.task_meta_data, location=task_output_location)
workflow.savedata(envi_binary_morph_task.outputs.output_raster_uri, location=task_output_location)

# Execute workflow


The following table lists all ENVI_BinaryMorphologicalFilter 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 directory Specify a raster on which to perform morphological filtering. -- 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
input_raster_raw_output False False See ENVIRASTER input type Provide True to output an ENVI Binary instead of a tif. -- Value Type: STRING
kernel False [[true, true, true], [true, true, true], [true, true, true]] string Specify a structuring element for the morphological process. The elements are interpreted as binary values, either 0 or 1. If no KERNEL is specified, a 3 x 3 array will be used with a value of 1 for all of the array elements, indicating that all pixels will be used. -- Value Type: BOOLEANARRAY -- Default Value: [[true, true, true], [true, true, true], [true, true, true]]
iterations False 1 string Specify the number of iterations used to perform the morphological operation. -- Value Type: INT -- Default Value: 1
method True N/A string Specify the filter method. -- Value Type: STRING
output_raster_uri_filename False N/A string Specify a string with the fully-qualified path and filename for OUTPUT_RASTER. -- Value Type: STRING


The following table lists all ENVI_BinaryMorphologicalFilter 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
output_raster_uri True N/A directory Output for OUTPUT_RASTER. -- Value Type: ENVIURI

Output structure

The output_raster_uri file will be written to the specified S3 Customer Account Location.


None at this time.


For additional background information on this task please refer to the Harris Geospatial ENVI documentation and
ENVI® Binary Morphological Filter.


If you have any questions or issues with this task, please contact