RPCOrthorectification Task

This task orthorectifies an image containing a Rational Polynomial Coefficient (RPC) sensor model or Replacement Sensor Model (RSM), using optional Digital Elevation Model (DEM) and Ground Control Points (GCP) files.

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)

 

; Open a DEM

DEMFile = 'DEM.dat'

DEMRaster = e.OpenRaster(DEMFile)

 

; Open a ground control point (GCP) file

GCPFile = 'OutGCPs.pts'

GCPs = ENVIGCPSet(GCPFile)

 

; Get the RPC orthorectification task

Task = ENVITask('RPCOrthorectification')

 

; Define parameters for the task

Task.INPUT_RASTER = inputRaster

Task.DEM_RASTER = DEMRaster

Task.INPUT_GCP = GCPs

 

; Run the task

Task.Execute

 

; Get the collection of data objects currently available in the Data Manager

DataColl = e.Data

 

; Add the output to the Data Manager

DataColl.Add, Task.OUTPUT_RASTER

 

; Display the result

View = e.GetView()

Layer = View.CreateLayer(Task.OUTPUT_RASTER)

Syntax

Result = ENVITask ('RPCOrthorectification')

Input properties (Set, Get): INPUT_RASTER, DEM_RASTER, INPUT_GCP, DEM_IS_HEIGHT_ABOVE_ELLIPSOID, GEOID_OFFSET, GRID_SPACING, OUTPUT_COORDINATE_SYSTEM, OUTPUT_PIXEL_SIZE, OUTPUT_SUBSET, OUTPUT_RASTER_URI, RESAMPLING

Output properties (Get only): 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). The default value is false.

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.

GEOID_OFFSET (optional)

Set this property to a floating-point value (in meters) of a geoid offset if the DEM is referenced to mean sea level.

GRID_SPACING (optional)

Specify a value that represents the grid spacing in output pixels, for which ENVI finds the corresponding pixels in the input images through an RPC-based transform. With a coarse grid, the RPC orthorectification is faster but less accurate. The default value is 10. A value of 1 is for a rigorous orthorectification when you have a high-resolution DEM and the study area has lots of terrain relief.

INPUT_GCP (optional)

Set this property to the name of a ground control point (GCP) file.

INPUT_RASTER (required)

Specify a raster with an RPC spatial reference.

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_PIXEL_SIZE (optional)

Set this property to 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.

OUTPUT_SUBSET (optional)

Use this property to define a spatial subset from the input image that will apply to the output from ENVIRPCOrthorectificationTask. The output will be a rectangular subset that encompasses the extent of the input subset, as the following figure shows:

If you set this property, the output extent will be larger than that of the input subset, but the output may contain background pixels. Also, you do not need to specify the ENVIGCPSet::ApplyOffset method to adjust the position of ground control points (GCPs).

Set this property to a four-element array expressing the spatial range (in pixels) of the input image. The array is of the form [x1, y1, x2, y2], where:

x1 = First pixel of the columns dimension

y1 = First pixel of the rows dimension

x2 = Last pixel of the columns dimension

y2 = Last pixel of the rows dimension

Pixel coordinates are zero-based.

RESAMPLING (required)

Specify the output resampling method:

Version History

ENVI 5.1

Introduced

ENVI 5.2

The GRID_SPACING property is now required.

The DEM_IS_HEIGHT_ABOVE_ELLIPSOID property is a Boolean type; valid options are true or false.

The OUTPUT_INTERPOLATION_METHOD property was renamed to RESAMPLING. It uses string values instead of integers.

ENVI 5.3. 2

Changed the OUTPUT_PIXEL_SIZE property to be a two-element array for the X and Y pixel sizes, in meters. It was previously a scalar value.

ENVI 5.4.1

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

ENVI 5.5.1

Added the OUTPUT_COORDINATE_SYSTEM property.

API Version

4.2

See Also

ENVITask, RPCOrthorectificationUsingReferenceImage Task