RegridRasterSeriesByIndex Task

This task reprojects a series of rasters to a common spatial grid, using the spatial reference of a selected raster index within the series.

Example

This example uses sample images files are available from our ENVI Tutorials web page. Click the Landsat Case Studies link to download the .zip file to your machine, then unzip the files. The files you will use in this example are located in the TimeSeries folder of the download. Update the file references in the example with the correct locations.

Note: This example is only meant to show how the task works. It is not a realistic scenario because all of the Landsat images have the same pixel size (30 meters) and the same number of rows and columns.

; Start the application

e = ENVI()

 

; Select input rasters

Files = FILE_SEARCH('C:\Data', 'LasVegas*.dat')

numRasters = N_Elements(Files)

rasters = ObjArr(numRasters)

FOR i=0, (numRasters-1) DO $

rasters[i] = e.OpenRaster(Files[i])

 

; Get the build raster series task from the catalog of ENVITasks

Task = ENVITask('BuildRasterSeries')

 

; Define inputs

Task.INPUT_RASTERS = rasters

 

; Run the task

Task.Execute

Series = Task.OUTPUT_RASTERSERIES

 

; Get the task from the catalog of ENVITasks

RegridTask = ENVITask('RegridRasterSeriesByIndex')

 

; Define inputs

RegridTask.INPUT_RASTERSERIES = Series

RegridTask.RASTER_INDEX = 2

 

; Run the task

RegridTask.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, RegridTask.OUTPUT_RASTERSERIES

 

; Display the result

View = e.GetView()

Layer = View.CreateLayer(RegridTask.OUTPUT_RASTERSERIES)

Syntax

Result = ENVITask('RegridRasterSeriesByIndex')

Input parameters (Set, Get):INPUT_RASTERSERIES, OUTPUT_RASTERSERIES_URI, RASTER_INDEX, RESAMPLING

Output parameters (Get only): OUTPUT_RASTERSERIES

Input Parameters

INPUT_RASTERSERIES (required)

Specify a raster series to reproject.

OUTPUT_RASTERSERIES_URI (optional)

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

RASTER_INDEX (optional)

Specify a zero-based raster index in the series whose spatial reference will define the spatial grid parameters for the regridding. If you do not set this parameter, the first raster in the series will be used by default.

RESAMPLING (optional)

Specify the resampling method to use when creating the spatial grid:

Output Parameters

OUTPUT_RASTERSERIES

This is a reference to the output raster series.

Methods

Execute

Parameter

ParameterNames

Properties

DESCRIPTION

DISPLAY_NAME

NAME

REVISION

TAGS

Version History

ENVI 5.2

Introduced

ENVI 5.5

Replaced INPUT_RASTERSERIES_URI with INPUT_RASTERSERIES

See Also

ENVITask, RegridRasterSeries Task, RegridRasterSeriesByIntersection Task, RegridRasterSeriesByUnion Task, ENVIGridDefinition, BuildRasterSeries Task, BuildTimeSeries Task, ENVIRasterSeries, ENVIRasterSeriesLayer