This task creates an array of rasters based on subrects. A subrect is a bounding box used to spatially subset a raster. It is 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
Task = ENVITask('DiceRasterBySubrects')
Task.INPUT_RASTER = Raster
Task.SUBRECT_ARRAY = Subrects
Task.SUBRECT_NAMES = SubNames
Task.Execute
DataColl = e.Data
DataColl.Add, Task.Output_Raster
View1 = e.GetView()
for i=0,N_Elements(Task.Output_Raster)-1 do $
Layer = View1.CreateLayer(Task.Output_Raster[i])
View1.Zoom, /FULL_EXTENT
Syntax
Result = ENVITask('DiceRasterBySubrects')
Input properties (Set, Get): INPUT_RASTER, SUBRECT_ARRAY, SUBRECT_NAMES
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:
INPUT_RASTER (required)
Specify the input raster.
OUTPUT_RASTER
This property contains an array of output rasters.
SUBRECT_ARRAY (required)
Specify a (4,n) array with subrects in [x1,y1,x2,y2] format.
SUBRECT_NAMES (optional)
Specify a string array for the names to be appended for each subrect.
Version History
API Version
4.3
See Also
ENVITask, ENVITask::Parameter, ENVISubsetRaster, CreateSubrectsFromDistance Task, CreateSubrectsFromPixels Task, CreateSubrectsFromTileCount Task, CreateSubrectsFromVector Task, DiceRasterByDistance Task, DiceRasterByPixel Task, DiceRasterByTileCount Task, DiceRasterByVector Task, ExportRastersToDirectory Task