>  Docs Center  >  ENVI API  >  Data Control  >  ENVIRasterSeries::GetData

ENVIRasterSeries::GetData

ENVIRasterSeries::GetData

This function method retrieves the data from a raster series.

Example


This example opens a spatiotemporal series file from the ENVI installation path. It then retrieves the data for all of the rasters in the series.

; Start the application
e = ENVI(/HEADLESS)
 
; Locate a raster series file
seriesFile = Filepath('AirTemp.series', Subdir=['data','time_series'], $
  Root_Dir = e.Root_Dir)
 
; Create a raster series object
series = ENVIRasterSeries(seriesFile)
 
; Get the data for all rasters
data = series.GetData()
 
; Get information about the rasters
Help, data

Syntax


Result = ENVIRasterSeries.GetData([, Keywords = value])

Keywords


Keywords are applied only during the initial creation of the object.

BANDS (optional)

Set this keyword to a zero-based band number (or array of band numbers) whose data you want to retrieve.

ERROR (optional)

Set this keyword to a named variable that will contain any error message issued during execution of this routine. If no error occurs, the ERROR variable will be set to a null string (''). If an error occurs and the routine is a function, then the function result will be undefined.

When this keyword is not set and an error occurs, ENVI returns to the caller and execution halts. In this case, the error message is contained within !ERROR_STATE and can be caught using IDL's CATCH routine. See IDL Help for more information on !ERROR_STATE and CATCH.

See Manage Errors for more information on error handling in ENVI programming.

INDEX (optional)

Specify an index number (or array of index numbers) of one or more rasters whose data you want to retrieve. If you do not specify this keyword, ENVI returns the data for the currently selected raster.

SUB_RECT (optional)

Set this keyword to a four-element array of pixel coordinates, expressing the spatial range of the raster data to retrieve. Pixel coordinates are zero-based. The array is of the form:

[x1, y1, x2, y2]

where:

x1: First pixel of the columns dimension

y1: First pixel of the rows dimension

x2: Last pixel of the columns dimension

y2: Last pixel of the rows dimension

Version History


ENVI 5.2

Introduced

API Version


3.3

See Also


ENVIRasterSeries, ENVIRaster



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us