ReprojectRaster Task
This task reprojects a raster to a standard spatial reference based on a specified coordinate system. It transforms and resamples coordinates from one spatial reference (standard, RPC, or pseudo) to a standard spatial reference in the specified coordinate system. It retains the pixel size of the input image.
This task offers a quick way to convert non-standard projections to a standard projection. In the case of RPCs, the RPCOrthorectification task provides a more accurate orthorectification.
ENVIReprojectRaster does not support geographic lookup tables (GLTs). Use the ReprojectGLT task instead.
The virtual raster associated with this task is ENVIReprojectRaster.
Example
; Start the application
e = ENVI()
; Open an input file
File = Filepath('qb_boulder_msi', Subdir=['data'], $
Root_Dir=e.Root_Dir)
Raster = e.OpenRaster(File)
; Get the task from the catalog of ENVITasks
Task = ENVITask('ReprojectRaster')
; Get the
; NAD_1983_StatePlane_Colorado_North_FIPS_0501_Feet
; coordinate system
CoordSys = ENVICoordSys(COORD_SYS_CODE=2231)
; Define inputs
Task.COORD_SYS = CoordSys
Task.INPUT_RASTER = Raster
; 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('ReprojectRaster')
Input properties (Set, Get): COORD_SYS, DATA_IGNORE_VALUE, GRID_SPACING, INPUT_RASTER, OUTPUT_RASTER_URI, RESAMPLING, TRANSFORM
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:
Properties
This task inherits the following properties from ENVITask:
This task also contains the following properties:
COORD_SYS (required)
Specify an ENVICoordSys object representing the coordinate system to which to transform the image.
DATA_IGNORE_VALUE (optional)
Specify a unique data value for background pixels in the output raster.
GRID_SPACING (optional)
Specify the grid spacing (in pixels) to use for reprojection.
INPUT_RASTER (required)
Specify the raster to reproject. The raster must have a standard, RPC, or pseudo spatial reference defined.
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, the associated OUTPUT_RASTER will not be created. To force the creation of a temporary file set the property to an exclamation symbol (!).
RESAMPLING (optional)
Specify the resampling method.
Nearest Neighbor
(default): 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.
TRANSFORM (optional)
Specify the method used to reproject the raster.
Polynomial
Triangulation
(default)Rigorous
Version History
ENVI 5.3 |
Introduced |
ENVI 5.5 |
OUTPUT_RASTER_URI now supports '*', which allows OUTPUT_RASTER to be virtual output. |
ENVI 5.5. 2 |
Added DATA_IGNORE_VALUE, GRID_SPACING, and TRANSFORM properties. Also, the task has been refactored and no longer references the ENVIReprojectRaster virtual raster. |
API Version
4.2
See Also
ENVITask, RegridRaster Task, ENVIReprojectRaster, ENVICoordSys, ENVIPseudoRasterSpatialRef, ENVIRPCRasterSpatialRef, ENVIStandardRasterSpatialRef, ReprojectVector Task