ImageIntersection Task
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.
Example
; Start the application
e = ENVI()
; Open two input files
File1 = Filepath('world_dem', Subdir=['classic','data'], $
Root_Dir=e.Root_Dir)
Raster1 = e.OpenRaster(File1)
File2 = Filepath('egm96_global.dat', Subdir=['classic','data'], $
Root_Dir=e.Root_Dir)
Raster2 = e.OpenRaster(File2)
; Get the task from the catalog of ENVITasks
Task = ENVITask('ImageIntersection')
; Define inputs
Task.INPUT_RASTER1 = Raster1
Task.INPUT_RASTER2 = Raster2
; 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_RASTER1
DataColl.Add, Task.OUTPUT_RASTER2
; Display the result
View1 = e.GetView()
Layer1 = View1.CreateLayer(Task.OUTPUT_RASTER1)
View2 = e.CreateView()
Layer2 = View2.CreateLayer(Task.OUTPUT_RASTER2)
Syntax
Result = ENVITask('ImageIntersection')
Input parameters (Set, Get): INPUT_RASTER1, INPUT_RASTER2, OUTPUT_RASTER1_URI, OUTPUT_RASTER2_URI, RESAMPLING, WARPING_METHOD
Output parameters (Get only): OUTPUT_RASTER1, OUTPUT_RASTER2
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
INPUT_RASTER1 (required)
Specify a raster to use as the base for computing the intersection.
INPUT_RASTER2 (required)
Specify a second raster for computing the intersection.
OUTPUT_RASTER1_URI (optional)
Specify a string with the fully-qualified filename and path of the first output raster. If you do not specify this parameter, the output raster is only temporary. Once the raster has no remaining references, ENVI deletes the temporary file.
OUTPUT_RASTER2_URI (optional)
Specify a string with the fully-qualified filename and path of the second output raster. If you do not specify this parameter, the output raster is only temporary. Once the raster has no remaining references, ENVI deletes the temporary file.
RESAMPLING (optional)
Specify the resampling method to use when creating the spatial grid:
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.
WARPING_METHOD (optional)
Specify the warping method to use:
PolynomialRigorousTriangulation(default)
Output Parameters
OUTPUT_RASTER1
This is a reference to the first output raster of filetype ENVI. The pixel size will match whichever has the higher resolution: INPUT_RASTER1 or INPUT_RASTER2.
OUTPUT_RASTER2
This is a reference to the second output raster of filetype ENVI. The following rules apply:
- The projection must match that of OUTPUT_RASTER1.
- The pixel size must be in the same units as those of OUTPUT_RASTER1.
- The pixel size will match whichever has the higher resolution: INPUT_RASTER1 or INPUT_RASTER2.
Methods
Properties
Version History
|
ENVI 5.2 |
Introduced |