GBDX

ENVI® Classification Aggregation

This task aggregates smaller class regions to a larger, adjacent region as part of the classification cleanup. The ENVI Classification Aggregation Task requires that the image has been pre-processed using the Advanced Image Preprocessor, and that a classification has been run on the output from preprocessing.

GBDX Registered Name: ENVI_ClassificationAggregation
Provider: Harris Geospatial Solutions

Imagery Examples

WorldView 2 image after AOP correction

WorldView 2 image after AOP correction

WorldView 2 image after aggregation

WorldView 2 image after aggregation

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/ClassificationClumping'

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_isodata = gbdx.Task("ENVI_ISODATAClassification")
envi_isodata.inputs.input_raster = aop.outputs.data.value
tasks += [envi_isodata]

# Seive the classification
envi_sieve = gbdx.Task("ENVI_ClassificationSieving")
envi_sieve.inputs.input_raster = envi_isodata.outputs.output_raster_uri.value
tasks += [envi_sieve]

# Clump the classification
envi_clump = gbdx.Task("ENVI_ClassificationClumping")
envi_clump.inputs.input_raster = envi_sieve.outputs.output_raster_uri.value
tasks += [envi_clump]

workflow = gbdx.Workflow(tasks)
workflow.savedata(
    envi_clump.outputs.output_raster_uri, location=output_location
)

workflow.execute()

Inputs

The following table lists all ENVI_ClassificationClumping 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 on which to perform classification clumping. -- 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
dilate_kernel False [[1, 1, 1],[1, 1, 1],[1, 1, 1]] string Specify 2D array of zeros and ones that represents the structuring element (kernel) used for a dilate operation. If no kernel is specified, a 3 x 3 array will be used with a value of 1 for all of the array elements. Dilation is a morphological operation that uses a structuring element to expand the shapes contained in the input image. -- Value Type: UINTARRAY -- Default Value: [[1, 1, 1],[1, 1, 1],[1, 1, 1]]
erode_kernel False [[1, 1, 1],[1, 1, 1],[1, 1, 1]] string Specify 2D array of zeros and ones that represents the structuring element (kernel) used for an erode operation. If no kernel is specified, a 3 x 3 array will be used with a value of 1 for all of the array elements. Erosion is a morphological operation that uses a structuring element to reduce the shapes contained in the input image. -- Value Type: UINTARRAY -- Default Value: [[1, 1, 1],[1, 1, 1],[1, 1, 1]]
class_order False N/A string Specify the order of class names in which clumping is applied to the classification image. If you do not specify this property, the classes are processed from first to last. -- Value Type: STRINGARRAY
output_raster_uri_filename False N/A string Specify a string with the fully-qualified path and filename for OUTPUT_RASTER. -- Value Type: STRING

Outputs

The following table lists all ENVI_ClassificationClumping 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.

Background

For additional background information on this task please refer to the Harris Geospatial ENVI documentation and
ENVI® Classification Clumping.

Contact

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