Use Build Layer Stack to build a new multi-band file from georeferenced images of various pixel sizes, extents, and projections. The input bands will be resampled and reprojected to a common spatial grid. A common use of Build Layer Stack is combining different band groups from a Landsat-8 or Sentinel-2 data into one file.

You can write a script to perform layer stacking using the BuildLayerStack task.

Follow these steps:

  1. From the Toolbox, select Raster Management > Build Layer Stack. The Build Layer Stack dialog appears.

  2. Click the Browse button next to Input Rasters and select the image bands or files that will comprise the layer stack. If the files are already open in ENVI, you can also drag and drop the band names from the Data Manager or Layer Manager into the Input Rasters field.
  3. Drag and drop the items in the Input Rasters field to the desired order in the layer stack. The first item in the list will determine the output pixel size of the layer stack. For example, if the first item is a group of Sentinel-2 multispectral 10-meter bands, and the second item is a group of 20-meter bands, the output resolution will be 10 meters. In this case, the 20-meter bands will be up-sampled to 10 meters.
  4. Optional: Define a common grid to which the input images will be resampled and reprojected. A grid definition contains a known coordinate system plus any combination of other parameters such as pixel sizes, image dimensions, and tie point coordinates for the upper-left pixel. From the Grid Definition drop-down list, select the desired combination of grid parameters to define:
    • Coordinate system + extents + pixel size
    • Coordinate system + extents + image size
    • Coordinate system + pixel size + image size + tie point

    Depending on what you select, additional fields will display in the Build Layer Stack dialog such as Extents (Degrees), Pixel Size (Degrees), Image Size, and Tie Point fields.

  5. Use the Coordinate System field to define the output coordinate system of the layer stack. Use any of the following methods:
    • Click the Browse button to display the Select Coordinate System dialog. Use this option to manually define a coordinate system. See Select Coordinate Systems for further instructions.
    • Click the From Dataset button to use the grid definition of an existing dataset.
    • Click the From Current View button to use the grid definition from an existing view.
    • Click the Calculate Union/Intersection button . The Calculate from a Group of Rasters dialog appears. Select the Intersection option to include the extent encompassed by all of the rasters, or select the Union option to include only the extent where they overlap.

    • Display an input raster in the view, then click the Draw Bounding Box button . Click and drag the cursor to define a box outlining the extent of the layer stack.
    • The Extents (Degrees), Pixel Size (Degrees), Image Size, and Tie Point fields will automatically populate with the computed values. You can edit these if desired.

  6. From the Resampling Method drop-down list, select a resampling method:
    • Nearest Neighborc: Uses the nearest pixel without any interpolation to create the warped image.
    • Bilinear: Performs a linear interpolation using four pixels to resample the warped image.
    • Cubic Convolution: Uses 16 pixels to approximate the sinc function using cubic polynomials to resample the image. Cubic convolution resampling is significantly slower than the other methods.
  7. To write the output to disk, select the File radio button and specify a filename and location. To produce output in memory only, select the Virtual radio button.

  8. Enable the Display result check box to display the output in the view when processing is complete. Otherwise, if the check box is disabled, the result can be loaded from the Data Manager.
  9. To reuse these task settings in future ENVI sessions, save them to a file. Click the down arrow and select Save Parameter Values, then specify the location and filename to save to. Note that some parameter types, such as rasters, vectors, and ROIs, will not be saved with the file. To apply the saved task settings, click the down arrow and select Restore Parameter Values, then select the file where you previously stored your settings.

  10. To run the process in the background, click the down arrow and select Run Task in the Background. If an ENVI Server has been set up on the network, the Run Task on remote ENVI Server name is also available. The ENVI Server Job Console will show the progress of the job and will provide a link to display the result when processing is complete. See ENVI Servers for more information.

  11. Click OK.

See Also


ENVIGridDefinition, Map Information in ENVI, Metaspectral Datasets, Build Band Stacks