BuildTemporalCube Task

This task creates a multiband raster where each band represents a different date/time. The task can build such a raster from an array of single-band rasters, or it will calculate the same spectral index for each input raster, then merge all the spectral index rasters into the temporal cube.

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.

; Start the application

e = ENVI()

 

; Select input rasters

Files = FILE_SEARCH('data', 'TimeSeries', 'LasVegas*.dat')

numRasters = N_Elements(Files)

rasters = ObjArr(numRasters)

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

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

 

; Get the task from the catalog of ENVITasks

Task = ENVITask('BuildTemporalCube')

 

; Define inputs

Task.INPUT_RASTERS = rasters

Task.DATE_TIME_FORMAT = 'YYYY-Mon'

Task.SPECTRAL_INDEX = 'NDVI'

 

; Run the task

Task.Execute

 

; Add the output to the Data Manager

e.Data.Add, Task.OUTPUT_RASTER

 

; Display the result

View = e.GetView()

Layer = View.CreateLayer(Task.OUTPUT_RASTER)

Syntax

Result = ENVITask('BuildTemporalCube')

Input parameters (Set, Get): DATE_TIME_FORMAT, INPUT_RASTERS, OUTPUT_RASTER_URI, OVERLAP_OPERATION, SPECTRAL_INDEX

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

DATE_TIME_FORMAT (optional)

Specify the format to use for band names:

The default value is YYYY-MM-DD.

INPUT_RASTERS (required)

Specify an array of rasters from which to build the ENVI temporal cube. All input rasters must have valid "acquisition time" metadata to be able to build a temporal cube.

OUTPUT_RASTER_URI (optional)

Specify a string with the fully qualified filename and path to export the associated OUTPUT_RASTER.

OVERLAP_OPERATION (optional)

Specify the overlap operation to use when building the temporal cube. The default is Intersection.

SPECTRAL_INDEX (optional)

Specify a string representing the pre-defined spectral index to apply to the input rasters. If not set, the input rasters must be single-band and they will be used directly to produce the temporal cube.

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.6.3

Introduced

See Also

ENVITask, Working with Temporal Cubes