Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.

  >  Docs Center  >  ENVI API  >  Data Control  >  ENVIRaster::SetTile



This method sets the current tile with new data in conjunction with the ENVIRasterIterator object.

In order for ENVI to process images that are much larger than the total amount of system RAM available, large images are broken into pieces (tiles) that are small enough for the system to handle. When the image is processed, only one tile is read into memory at a time.


For the following example:

  1. Copy and paste the procedure into an IDL editor window.
  2. Save the file as enviraster_settile_example.pro.
  3. Compile and run the procedure.
PRO enviraster_settile_example
  ; start the application
  e = ENVI()
  ; open a raster
  file = FILEPATH('qb_boulder_pan', ROOT_DIR=e.ROOT_DIR, $
    SUBDIRECTORY = ['data'])
  raster = e.OpenRaster(file)
  ; Create an output raster
  newFile = e.GetTemporaryFilename()
  rasterNew = ENVIRaster(URI=newFile, INHERITS_FROM=raster)
  ; Iterate through the tiles of the original data set
  tiles = raster.CreateTileIterator()
  FOREACH tile, Tiles DO BEGIN
    data = EMBOSS(tile, /EDGE_WRAP)
    rasterNew.SetTile, Data, Tiles
  ; Save the data and display
  view = e.GetView()
  layer = view.CreateLayer(rasterNew)


ENVIRaster.SetTile, Data, Iterator [, ERROR=variable]



A 2D array of data to be written to the ENVIRaster, of the form [ncolumns, nbands] or [ncolumns, nrows], depending on the interleave of the ENVIRaster. The data dimensions must match those of the tile currently active in the iterator.


A reference to an ENVIRasterIterator.


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


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.

Version History



API Version


See Also

ENVIRaster, ENVIRaster::CreateTileIterator, ENVIRaster::SetData

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