This task exports multiple rasters to a specified directory on disk. It can be used, for example, as part of a sequence for dicing rasters:
Consider using one of the following to perform these steps in one task:
Example
e = ENVI()
File = Filepath('qb_boulder_msi', Subdir=['data'], $
Root_Dir=e.Root_Dir)
Raster = e.OpenRaster(File)
SubrectTask = ENVITask('CreateSubrectsFromTileCount')
SubrectTask.NUMBER_OF_X_TILES = 3
SubrectTask.NUMBER_OF_Y_TILES = 4
SubrectTask.NCOLUMNS = Raster.NCOLUMNS
SubrectTask.NROWS = Raster.NROWS
SubrectTask.Execute
Subrects = SubrectTask.SUBRECTS
SubNames = SubrectTask.SUBRECT_NAMES
DiceTask = ENVITask('DiceRasterBySubrects')
DiceTask.INPUT_RASTER = Raster
DiceTask.SUBRECT_ARRAY = Subrects
DiceTask.SUBRECT_NAMES = SubNames
DiceTask.Execute
Task = ENVITask('ExportRastersToDirectory')
Task.INPUT_RASTERS = DiceTask.OUTPUT_RASTER
Task.OUTPUT_DIRECTORY = Filepath('', /TMP)
Task.Execute
Syntax
Result = ENVITask('ExportRastersToDirectory')
Input parameters (Set, Get): DATA_IGNORE_VALUE, INPUT_RASTERS, INTERLEAVE, OUTPUT_DIRECTORY
Output parameters (Get only): OUTPUT_RASTERS
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
DATA_IGNORE_VALUE (optional)
Specify a unique data value for pixels in the output raster that have a non-zero pixel state value. See Raster Pixel State for more information.
INPUT_RASTERS (required)
Specify the rasters to export.
INTERLEAVE (optional)
Specify a string indicating the data interleave of the output raster. If this parameter is not set, the interleave of the input raster will be used. The choices are:
BSQ
BIL
BIP
OUTPUT_DIRECTORY
Specify the output directory. If you do not set this parameter, the directory will set to the ENVI output directory.
Output Parameters
OUTPUT_RASTERS
This is a reference to the output rasters of filetype ENVI.
Methods
Execute
Parameter
ParameterNames
Properties
DESCRIPTION
DISPLAY_NAME
NAME
REVISION
TAGS
Version History
See Also
ENVITask, ENVISubsetRaster, CreateSubrectsFromDistance Task, CreateSubrectsFromPixels Task, CreateSubrectsFromTileCount Task, CreateSubrectsFromVector Task, DiceRasterByDistance Task, DiceRasterByPixel Task, DiceRasterBySubrects Task, DiceRasterByTileCount Task, DiceRasterByVector Task, Masking Support in ENVITasks