RPCOrthorectificationUsingReferenceImage Task

This task performs a refined Rational Polynomial Coefficient (RPC) orthorectification by automatically generating Ground Control Points (GCPs) from a reference image.

Example

This example uses sample images from the RPC Orthorectification tutorial. Tutorial files are available from our ENVI Tutorials web page. On the ENVI Tutorials page, click the link to "ENVI Tutorial Data" to download all tutorial data. Files for this tutorial are in the rpc_ortho directory. Copy the files to your local drive, then change the paths in the code example to match the locations of the files on disk.

; Start the application

e = ENVI()

 

; Open the input raster

inputFile = 'OrbViewSubset.dat'

inputRaster = e.OpenRaster(inputFile)

 

; For reference image, use NAIP image with

; one-meter ground sample distance

referenceFile = 'NAIPReferenceImage.dat'

referenceRaster = e.OpenRaster(referenceFile)

 

; For DEM, use NED 1/9-arc second resolution

DEMFile = 'DEM.dat'

DEMRaster = e.OpenRaster(DEMFile)

 

; Get the task from the catalog of ENVITasks

Task = ENVITask('RPCOrthorectificationUsingReferenceImage')

 

; Define inputs

Task.INPUT_RASTER = inputRaster

Task.INPUT_REFERENCE_RASTER = referenceRaster

Task.INPUT_DEM_RASTER = DEMRaster

 

; Run the task

Task.Execute

 

; Display the orthorectified image

View = e.GetView()

Layer = View.CreateLayer(Task.OUTPUT_RASTER)

View.Zoom, /FULL_EXTENT

Syntax

Result = ENVITask('RPCOrthorectificationUsingReferenceImage')

Input properties (Set, Get): DEM_IS_HEIGHT_ABOVE_ELLIPSOID, GRID_SPACING, INPUT_DEM_RASTER, INPUT_RASTER, INPUT_REFERENCE_RASTER, OUTPUT_COORDINATE_SYSTEM, OUTPUT_GCPS_URI, OUTPUT_PIXEL_SIZE, OUTPUT_RASTER_URI, REQUESTED_NUMBER_OF_GCPS, RESAMPLING, SEARCH_WINDOW

Output properties (Get only): OUTPUT_GCPS, OUTPUT_RASTER

Properties marked as "Set" are those that you can set to specific values. You can also retrieve their current values any time. Properties marked as "Get" are those whose values you can retrieve but not set.

Methods

This task inherits the following methods from ENVITask:

AddParameter

Execute

Parameter

ParameterNames

RemoveParameter

Properties

This task inherits the following properties from ENVITask:

COMMUTE_ON_DOWNSAMPLE

COMMUTE_ON_SUBSET

DESCRIPTION

DISPLAY_NAME

NAME

REVISION

TAGS

This task also contains the following properties:

DEM_IS_HEIGHT_ABOVE_ELLIPSOID (optional)

Set this property to true if the DEM is already expressed as the height above the ellipsoid and no geoid correction is required. Most DEM data contain orthometric heights, which are elevations above mean sea level (for example, GMTED2010 or National Elevation Dataset, NED). In these cases, keep the default selection of false.

GRID_SPACING (optional)

Specify the grid spacing (in pixels) to use for orthorectification. The default value is 10.

INPUT_DEM_RASTER (required)

Specify a digital elevation model (DEM) raster. A DEM raster is only required if the input raster has an RPC sensor model. It must have valid map information. If you do not have a DEM file readily available, you can use the global DEM named GMTED2010.jp2 that is provided under the ENVI installation folder. The Global Multi-resolution Terrain Elevation Data 2010 (GMTED2010) has a mean resolution of 30 arc seconds.

INPUT_RASTER (required)

Specify a raster with an RPC spatial reference.

INPUT_REFERENCE_RASTER (required)

Specify a reference image from which to match and find the geographic coordinates of the GCPs. The reference raster should be a true orthorectified image with the same or slightly higher spatial resolution than the input raster. Try to choose a reference image that is close to the year and season of the input raster. Automatic GCP generation is based on image matching between the reference image and source image, so the scene contents should not be vastly different. Automatic GCP generation is more robust if the reference image and input image have similar resolution. If the reference image has a much higher resolution than the input image (i.e., the ratio is greater than 2.5), consider down-sampling the reference image first.

OUTPUT_COORDINATE_SYSTEM (optional)

Set this property to a valid ENVICoordSys object indicating the coordinate system to use. The default value is a UTM projection.

OUTPUT_GCPS

This is a reference to the output GCPs.

OUTPUT_GCPS_URI (optional)

Specify a string with the fully qualified path and filename for OUTPUT_GCPS.

OUTPUT_PIXEL_SIZE (optional)

Specify a two-element array indicating the output X and Y pixel size, in the units defined by OUTPUT_COORDINATE_SYSTEM. The default value is the pixel size of the input image.

OUTPUT_RASTER

This is a reference to the output raster of filetype ENVI.

OUTPUT_RASTER_URI (optional)

Specify a string with the fully qualified filename and path of the associated OUTPUT_RASTER. If you do not specify this property, or set it to an exclamation symbol (!), a temporary file will be created.

REQUESTED_NUMBER_OF_GCPS (optional)

Specify the requested number of GCPs. The default value is 25.

RESAMPLING (optional)

Specify the output resampling method:

SEARCH_WINDOW (optional)

Specify the search window size. Increase the value if there is a big misalignment between the input raster and the reference raster.

Version History

ENVI 5.3. 1

Introduced

ENVI 5.3.2

Added the OUTPUT_PIXEL_SIZE property

ENVI 5.4.1

Input rasters can have a replacement sensor model (RSM) or an RPC sensor model. The INPUT_RASTER and DEM_RASTER property descriptions were updated to mention this.

ENVI 5.4.2

Added the SEARCH_WINDOW property

ENVI 5.5.1

Added the OUTPUT_COORDINATE_SYSTEM property

API Version

4.2

See Also

ENVITask, GenerateGCPsFromReferenceImage Task, GenerateGCPsFromTiePoints Task, ENVIGCPSet, ENVITiePointSet, RPCOrthorectification Task