>  Docs Center  >  Using ENVI  >  Dice Rasters
ENVI

Dice Rasters

Dice Rasters

Use the Dice Raster tools to separate a raster into tiles based on tile count, distance, pixel count, or a vector shapefile.

Dice Raster by Tile Count

Use Dice Raster by Tile Count to separate a raster into a specified number of tiles in the X and Y direction.

In most cases, the number of pixels (in both directions) will not be divisible by the specified number of tiles. For example, suppose that an image has 10 rows and 10 columns and you want to separate it into 3 tiles in the X and Y directions. Since 10 divided by 3 is 3.333, ENVI rounds up to the nearest integer (4) when creating the tiles. The last tile in each column and row will have smaller dimensions. The following figure shows how the tiles are created:

You can also write a script to perform this type of dicing using the ENVIDiceRasterByTileCountTask routine.

Follow these steps:

  1. From the Toolbox, select Raster Management > Raster Dicer > Dice Raster by Tile Count. The Dice Raster by Tile Count dialog appears.
  2. Select an input file and perform optional spatial and spectral subsetting.
  3. Enter the Number of X Tiles and Number of Y Tiles.
  4. To write the output files to disk, select the File radio button and specify an output directory. To produce output in memory only, select the Virtual Raster(s) radio button.
  5. Enable the Output Tile Grid Vectors option to create a shapefile that shows the tile boundaries. The shapefile will save to the directory indicated by the ENVI Temporary Directory preference.
  6. Enable the Preview check box to see a preview of the settings before you click OK to process the data. The preview is calculated only on the area in the Image window and uses the resolution level at which you are viewing the image. See Preview for details on the results.
  7. Enable the Display result check box to display the tiled rasters in the Image window when processing is complete. Otherwise, if the check box is disabled, the rasters can be loaded from the Data Manager.
  8. Click OK. ENVI adds the tiled rasters to the Data Manager and, if the Display Result check box was enabled, adds the layers to the Layer Manager and displays them in the Image window. The output directory will contain the tiled rasters. Their filenames contain the root name of the input raster with the row/column index appended in the form of RxCx. For example, R2C3 means row 2 and column 3.

Dice Raster by Distance

Use Dice Raster by Distance to separate a raster into tiles based on a specified distance. In most cases the tiles in the last row and column will be smaller than the specified distance, as the following example shows:

You can also write a script to perform this type of dicing using the ENVIDiceRasterByDistanceTask routine.

Follow these steps:

  1. From the Toolbox, select Raster Management > Raster Dicer > Dice Raster by Distance. The Dice Raster by Distance dialog appears.
  2. Select an input file and perform optional spatial and spectral subsetting.
  3. Enter a Tile Distance.
  4. Select the Distance Units from the drop-down list.
  5. To write the output files to disk, select the File radio button and specify an output directory. To produce output in memory only, select the Virtual Raster(s) radio button.
  6. Enable the Output Tile Grid Vectors option to create a shapefile that shows the tile boundaries. The shapefile will save to the directory indicated by the ENVI Temporary Directory preference.
  7. Enable the Preview check box to see a preview of the settings before you click OK to process the data. The preview is calculated only on the area in the Image window and uses the resolution level at which you are viewing the image. See Preview for details on the results.
  8. Enable the Display result check box to display the tiled rasters in the Image window when processing is complete. Otherwise, if the check box is disabled, the rasters can be loaded from the Data Manager.
  9. Click OK. ENVI adds the tiled rasters to the Data Manager and, if the Display Result check box was enabled, adds the layers to the Layer Manager and displays them in the Image window. The output directory will contain the tiled rasters. Their filenames contain the root name of the input raster with the row/column index appended in the form of RxCx. For example, R2C3 means row 2 and column 3.

Dice Raster by Pixel Count

Use Dice Raster by Pixel Count to separate a raster into tiles based on number of pixels. In most cases the tiles in the last row and column will be smaller than the specified distance, as the following example shows:

You can also write a script to perform this type of dicing using the ENVIDiceRasterByPixelTask routine.

  1. From the Toolbox, select Raster Management > Raster Dicer > Dice Raster by Pixel Count. The Dice Raster by Number of Pixels dialog appears.
  2. Select an input file and perform optional spatial and spectral subsetting.
  3. Enter a value for Number of X Pixels and Number of Y Pixels.
  4. To write the output files to disk, select the File radio button and specify an output directory. To produce output in memory only, select the Virtual Raster(s) radio button.
  5. Enable the Output Tile Grid Vectors option to create a shapefile that shows the tile boundaries. The shapefile will save to the directory indicated by the ENVI Temporary Directory preference.
  6. Enable the Preview check box to see a preview of the settings before you click OK to process the data. The preview is calculated only on the area in the Image window and uses the resolution level at which you are viewing the image. See Preview for details on the results.
  7. Enable the Display result check box to display the tiled rasters in the Image window when processing is complete. Otherwise, if the check box is disabled, the rasters can be loaded from the Data Manager.
  8. Click OK. ENVI adds the tiled rasters to the Data Manager and, if the Display Result check box was enabled, adds the layers to the Layer Manager and displays them in the Image window. The output directory will contain the tiled rasters. Their filenames contain the root name of the input raster with the row/column index appended in the form of RxCx. For example, R2C3 means row 2 and column 3.

Dice Raster by Vectors

Use Dice Raster by Vectors to separate a raster into tiles based on the spatial extent of individual vector records. The number of resulting tiles will be equal to the number of separate vector records.

You can also write a script to perform this type of dicing using the ENVIDiceRasterByVectorTask routine.

  1. From the Toolbox, select Raster Management > Raster Dicer > Dice Raster by Vectors. The Dice Raster from a vector Shapefile dialog appears.
  2. Select an input file and perform optional spatial and spectral subsetting.
  3. Select an input vector file that will be used to create the tiles.
  4. To write the output files to disk, select the File radio button and specify an output directory. To produce output in memory only, select the Virtual Raster(s) radio button.
  5. Click OK. ENVI adds the tiled rasters to the Data Manager and, if the Display Result check box was enabled, adds the layers to the Layer Manager and displays them in the Image window. The output directory will contain the tiled rasters. Their filenames contain the root name of the input raster with "Areaxx" appended, where xx is the vector record number.



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