GBDX

ENVI® Image Intersection

Image intersection takes two rasters as input, and it outputs two rasters that cover only the overlapping area of two inputs. If the input rasters have different projections or pixel sizes, one of the output rasters will be reprojected or resampled so that the two output rasters have the same number of samples and lines. File inputs can have standard map projections, can be pixel-based, or can have RPC information.

GBDX Registered Name: ENVI_ImageIntersection
Provider: Harris Geospatial Solutions

Imagery Examples

Overlapping WorldView 2 images after AOP correction

Overlapping WorldView 2 images after AOP correction

Overlapping area of WorldView 2 images after the intersection task

Overlapping area of WorldView 2 images after the intersection task

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

# Change Detection task setup
pre_cat_id = '103001001C423600'
post_cat_id = '10504100003E9200'

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

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

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

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

# Find where the images intersect
envi_II = gbdx.Task("ENVI_ImageIntersection")
envi_II.inputs.input_raster1 = pre_aop.outputs.data.value
envi_II.inputs.input_raster2 = post_aop.outputs.data.value
tasks += [envi_II]

workflow = gbdx.Workflow(tasks)
workflow.savedata(
    envi_II.outputs.output_raster1_uri, location=join(output_location, 'output_1')
)
workflow.savedata(
    envi_II.outputs.output_raster2_uri, location=join(output_location,'output_2')
)
workflow.execute()

Inputs

The following table lists all ENVI_ImageIntersection 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[*]
warping_method False "triangulation" string Specify the warping method to use. -- Value Type: STRING -- Default Value: "Triangulation"
output_raster2_uri_filename False N/A string Specify a string with the fully-qualified path and filename for OUTPUT_RASTER2. -- Value Type: STRING
resampling False "bilinear" string Specify the resampling method. Nearest Neighbor: Uses the nearest pixel without any interpolation. Bilinear: Performs a linear interpolation using four pixels to resample, Cubic Convolution: Uses 16 pixels to approximate the sinc function using cubic polynomials to resample the image. -- Value Type: STRING -- Default Value: "Bilinear"
input_raster1 True N/A See ENVIRASTER input type Specify a raster to use as the base for computing the intersection. -- Value Type: ENVIRASTER
input_raster1_format False N/A string Provide the format of the image, for example: landsat-8. -- Value Type: STRING
input_raster1_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_raster1_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_raster2 True N/A See ENVIRASTER input type Specify a second raster for computing the intersection. -- Value Type: ENVIRASTER
input_raster2_format False N/A string Provide the format of the image, for example: landsat-8. -- Value Type: STRING
input_raster2_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_raster2_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
output_raster1_uri_filename False N/A string Specify a string with the fully-qualified path and filename for OUTPUT_RASTER1. -- Value Type: STRING

Outputs

The following table lists all ENVI_ImageIntersection 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_raster2_uri True N/A directory Output for OUTPUT_RASTER2. -- Value Type: ENVIURI
output_raster1_uri True N/A directory Output for OUTPUT_RASTER1. -- Value Type: ENVIURI

Output structure

The output_raster image file will be written to the specified S3 Customer Account Location in GeoTiff (.tif) format, with an ENVI header file (.hdr)

Background

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

Contact

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

ENVI® Image Intersection

Image intersection takes two rasters as input, and it outputs two rasters that cover only the overlapping area of two inputs. If the input rasters have different projections or pixel sizes, one of the output rasters will be reprojected or resampled so that the two output rasters have the same number of samples and lines. File inputs can have standard map projections, can be pixel-based, or can have RPC information.

GBDX Registered Name: ENVI_ImageIntersection
Provider: Harris Geospatial Solutions