GBDX

ENVI® NNDiffuse PanSharpening

This task performs Nearest Neighbor Diffuse (NND) Pansharpening using a low-resolution raster and a high-resolution panchromatic raster.

GBDX Registered Name: ENVI_NNDiffusePanSharpening
Provider: Harris Geospatial Solutions

NNDiffuse Pansharpening works best when the spectral response function of each multispectral band has minimal overlap with one another, and the combination of all multispectral bands covers the spectral range of the panchromatic raster.
The following are input raster requirements for running the NND Pansharpening algorithm:

  • The pixel size of the low-resolution raster must be an integral multiple of the pixel size of the high-resolution raster. If it is not, then pre-process (resample) the rasters.
  • When the rasters have projection information, it must be in the same
    projection. If it is not the same, then reproject the rasters.
  • The rasters must be aligned. If the rasters have misalignment, then
    register the rasters.
  • Ensure that the rasters line up, particularly in the upper-left
    corner (see the following diagram). When alignment is as little as
    1/2 pixel off between the two, pan sharpening accuracy will be
    affected. If both input rasters have map information, they will be
    automatically subsetted so that they line up. If the rasters do not
    line up and do not have map information, then use spatial subsetting.

Imagery Examples

Before: This is an example of an IKONOS image that has not been pan-sharpened

Before: This is an example of an IKONOS image that has not been pan-sharpened

After:  This is the same IKONOS image after running ENVI NNDiffuse PanSharpening

After: This is the same IKONOS image after running ENVI NNDiffuse PanSharpening

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

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_high = gbdx.Task("AOP_Strip_Processor")
aop_high.inputs.data = order.outputs.s3_location.value
aop_high.inputs.bands = 'MS'
aop_high.inputs.enable_dra = False
aop_high.outputs.data.persist = True
aop_high.outputs.data.persist_location = output_location+'/multispectral'
aop_high.timeout = 36000
tasks += [aop_high]

aop_low = gbdx.Task("AOP_Strip_Processor")
aop_low.inputs.data = order.outputs.s3_location.value
aop_low.inputs.bands = 'PAN'
aop_low.inputs.enable_dra = False
aop_low.outputs.data.persist = True
aop_low.outputs.data.persist_location = output_location+'/pan'
aop_low.timeout = 36000
tasks += [aop_low]

envi_nndpan = gbdx.Task("ENVI_NNDiffusePanSharpening")
envi_nndpan.inputs.input_high_resolution_raster = aop_high.outputs.data.value
envi_nndpan.inputs.input_low_resolution_raster = aop_low.outputs.data.value

workflow = gbdx.Workflow(tasks)
workflow.savedata(
    aop_high.outputs.data, location=join(output_location, 'multispectral')
)
workflow.savedata(
    aop_low.outputs.data, location=join(output_location, 'pan')
)
workflow.savedata(
    envi_nndpan.outputs.output_raster_uri, location=output_location
)

workflow.execute()

Inputs

The following table lists all ENVI_NNDiffusePanSharpening 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_low_resolution_raster True N/A See ENVIRASTER input type Specify a low-resolution raster. -- Value Type: ENVIRASTER
input_low_resolution_raster_format False N/A string Provide the format of the image, for example: landsat-8. -- Value Type: STRING
input_low_resolution_raster_band_grouping False N/A string Provide the name of the band grouping to be used in the task, ie - panchromatic. -- Value Type: STRING
input_low_resolution_raster_filename False N/A string Provide the explicit relative raster filename that ENVI will open. This overrides any file lookup in the task runner. -- Value Type: STRING
input_low_resolution_raster_raw_output False False See ENVIRASTER input type Provide True to output an ENVI Binary instead of a tif. -- Value Type: STRING
spatial_smoothness False N/A string Specify the spatial smoothness factor of the NNDiffuse pan-sharpening algorithm. The default value is PIXEL_SIZE_RATIO * 0.62. -- Value Type: FLOAT
pixel_size_ratio False N/A string Specify the pixel size ratio. An integer that defines the pixel size ratio of the low-resolution raster and the high-resolution raster. If PIXEL_SIZE_RATIO is not specified, the value is determined from the metadata of the input rasters. -- Value Type: UINT
intensity_smoothness False N/A string Specify the intensity smoothness factor of the NNDiffuse pan-sharpening algorithm. If INTENSITY_SMOOTHNESS is not specified, the value is set adaptively using local similarity. -- Value Type: FLOAT
input_high_resolution_raster True N/A See ENVIRASTER input type Specify a high-resolution panchromatic raster. -- Value Type: ENVIRASTER
input_high_resolution_raster_format False N/A string Provide the format of the image, for example: landsat-8. -- Value Type: STRING
input_high_resolution_raster_band_grouping False N/A string Provide the name of the band grouping to be used in the task, ie - panchromatic. -- Value Type: STRING
input_high_resolution_raster_filename False N/A string Provide the explicit relative raster filename that ENVI will open. This overrides any file lookup in the task runner. -- Value Type: STRING
input_high_resolution_raster_raw_output False False See ENVIRASTER input type Provide True to output an ENVI Binary instead of a tif. -- 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

Outputs

The following table lists all ENVI_NNDiffusePanSharpening 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® ENVI_NN Diffuse Pan Sharpening.

Contact

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