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.

; 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 properties (Set, Get): DATE_TIME_FORMAT, INPUT_RASTERS, OUTPUT_RASTER_URI, OVERLAP_OPERATION, SPECTRAL_INDEX

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:

AddParameter

Execute

Parameter

ParameterNames

RemoveParameter

Properties


This task inherits the following properties from ENVITask:

COMMUTE_ON_DOWNSAMPLE

COMMUTE_ON_SUBSET

DESCRIPTION

DISPLAY_NAME

NAME

REVISION

TAGS

This task also contains the following properties:

DATE_TIME_FORMAT (optional)

Specify the format to use for band names:

  • Mon-DD

  • Mon-YYYY

  • MM-DD

  • MM-DD-YYYY

  • MM-DD-YY

  • MM-DD-YYYY HH:MM:SS

  • MM-DD-YY HH:MM:SS

  • DD-Mon

  • DD-MM

  • DD-MM-YYYY

  • DD-MM-YY

  • DD-MM-YYYY HH:MM:SS

  • DD-MM-YY HH:MM:SS

  • YYYY-MM-DD

  • YYYY-Mon

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

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 to export the associated OUTPUT_RASTER.

  • If you set this property to an asterisk symbol (*), the output raster will be virtual and not written to disk.
  • If you do not specify this property, the associated output raster will not be created. To force the creation of a temporary file, set this parameter to an exclamation symbol (!).

OVERLAP_OPERATION (optional)

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

  • Union

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

Version History


ENVI 5.6.3

Introduced

API Version


4.3

See Also


ENVITask, Working with Temporal Cubes