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. Click the RPC Ortho link to download the .zip file to your machine, then unzip the files. Update the file references in the example with the correct locations.
e = ENVI()
inputFile = 'OrbViewSubset.dat'
inputRaster = e.OpenRaster(inputFile)
DEMFile = 'DEM.dat'
DEMRaster = e.OpenRaster(DEMFile)
GCPFile = 'OutGCPs.pts'
GCPs = ENVIGCPSet(GCPFile)
Task = ENVITask('RPCOrthorectification')
Task.INPUT_RASTER = inputRaster
Task.DEM_RASTER = DEMRaster
Task.INPUT_GCP = GCPs
Task.Execute
DataColl = e.Data
DataColl.Add, Task.OUTPUT_RASTER
View = e.GetView()
Layer = View.CreateLayer(Task.OUTPUT_RASTER)
Syntax
Result = ENVITask ('RPCOrthorectification')
Input parameters (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 parameters (Get only): OUTPUT_RASTER
Parameters marked as "Set" are those that you can set to specific values. You can also retrieve their current values any time. Parameters marked as "Get" are those whose values you can retrieve but not set.
Input Parameters
DEM_IS_HEIGHT_ABOVE_ELLIPSOID (optional)
Set this parameter 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 parameter 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 parameter 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 parameter to a valid ENVICoordSys object indicating the coordinate system to use. The default value is a UTM projection.
OUTPUT_PIXEL_SIZE (optional)
Set this parameter 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_URI (optional)
Specify a string with the fully qualified filename and path of the associated OUTPUT_RASTER.
- If you do not specify this parameter, or set it to an exclamation symbol (!), ENVI creates a temporary file.
- If you set it to the hash symbol (#), ENVI creates a file in the temporary directory, but this file will not be deleted when ENVI closes.
OUTPUT_SUBSET (optional)
Use this parameter 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 parameter, 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 parameter 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:
- Nearest Neighbor: uses the nearest pixel without any interpolation.
- Bilinear (default): 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.
Output Parameters
OUTPUT_RASTER
This is a reference to the output raster of filetype ENVI.
Methods
Execute
Parameter
ParameterNames
Properties
DESCRIPTION
DISPLAY_NAME
NAME
REVISION
TAGS
Version History
ENVI 5.1 |
Introduced |
ENVI 5.2 |
The GRID_SPACING parameter is now required.
The DEM_IS_HEIGHT_ABOVE_ELLIPSOID parameter is a Boolean type; valid options are true or false.
The OUTPUT_INTERPOLATION_METHOD parameter was renamed to RESAMPLING. It uses string values instead of integers.
|
ENVI 5.3. 2 |
Changed the OUTPUT_PIXEL_SIZE parameter 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 parameter descriptions were updated to mention this.
|
ENVI 5.5.1 |
Added the OUTPUT_COORDINATE_SYSTEM parameter.
|
See Also
ENVITask, RPCOrthorectificationUsingReferenceImage Task, Masking Support in ENVITasks