In this lab we will review the ENVI interface and basic data processing tasks. This lab will also review evaluating the characteristics of satellite imagery.
In ENVI there are several tools that help you visualize data. The Overview option shows a thumbnail of the raster and defines the extent currently shown in the view. Another useful tool is the Reference Map Link that opens up a new window with a variety of base maps that correspond to the raster in the viewer.
- Click the Overview check box for the desired View in the Layer Manager window.
The Overview appears in the top-left corner of each Image window view. The Overview Locater, a rectangle within the Overview, defines the extent to show in the view. As you move around the image the locator rectangle moves accordingly. Turn off the Overview by clicking the disable the check box.
- Now let’s get an idea of the geographic area the images cover. From the menu bar select View → Reference Map Link. This opens up a new window with a variety of base map options that shows the geographic extent of the raster in the viewer. Check out some of the different Esri maps available. Close the Reference Map window when you are done.
Data Manager & Metadata
Metadata provide details about a dataset in general such as its source, data type, and projection. In ENVI the metadata is stored in the header file (.hdr). The metadata can be edited in the program or the header file can be edited using a text editing program like notepad.
- Open the Data Manager
and notice that there are many different data products included in the Sentinel-2 Level-2 bundle, spend some time looking at the different data available in the data manager. The bands are packaged in "bundles" based on spatial resolution and data type, see the below table for reference. Visit the Sentinel-2 L2A webpage to learn more about what the different layers represent.
| Name |
Description |
| S2MSI2A |
Surface reflectance for 10m bands (RGB, NIR) |
| AOT |
Aerosol optical thickness (unitless) |
| WVP |
Water vapor |
| TCI |
True color image - an RGB image built from the B02 (Blue), B03 (Green), and B04 (Red) Bands. The reflectance are coded between 1 and 255 (visual) |
| SCL |
Scene classification data |
- In the Data Manager, right-click on the 10m-S2MSIA layer and select View Metadata. This will open up the metadata for the associated layers (in this case the four spectral bands with 10-m spatial resolution). Click through the various tabs and explore the metadata. Use the metadata viewer to determine the sensor type, date, spatial and spectral resolution of the image as well as the projection/coordinate system. Record this information as you will need to include in your lab submission. Close the metadata window when you are done.
- Now repeat the process and review the metadata for the 20m-S2MSIA and 60m-S2MSIA layers. Also use the internet to research the satellite resolution and other characteristics.
- In the Data Manager, right-click on the 20m-S2MSIA layer and this time select Load Default. This will add the 20-m multispectral data layer to the viewer, this data bundle includes red, red-edge, near-infrared, and shortwave infrared bands at 20m spatial resolution.
Layer Stacking Sentinel-2 Data
To be able to view and work with all of the desired Sentinel-2 bands, the separate layers will need to stacked and re-sampled to the same spatial resolution. In ENVI the Layer Stack tool is designed to both combine multiple separate layers and re-sample and/or re-project all layers to a common spatial grid.
- In the ENVI Toolbox select Raster Management → Build Layer Stack. In the Layer Stack window click to add the layer beside Input Rasters. In the Data Selection Window select the 10m-S2MSI2A and 20m-S2MSI2A data (hold Ctrl key to select multiple items). Click OK. The 10m data should be at the top of the list.

- In the main Layer Stack dialog, click the Other tab. This allows the user to select the coordinate system, extent and pixel size of the stacked data. Under Grid Definition, use either From Current View or Draw a Bounding Box to limit the Layer Stacking extent to the Rio Grande and reservoirs (eastern side of the image, also use the Reference Map). The coordinate system, extent and pixel size should automatically be filled in. Set the pixel size to 20m or 10m your choice, this will re-sample all of the bands to have the same set spatial reoslution. If you set the pixel size to 10-meters, the file size will be significantly larger than if you set it to 20m resolution.

- Click back on the Main Layer Stack tab. Under Order Bands by Wavelength select Yes. The save the output raster as Sentinel_stack.dat or something similar, in your finals folder. This file will contain the first 10 bands of the Sentinel-2 data, all re-sampled to 10 or 20m spatial resolution. Click OK to create and save the layer stack. Wait to the image to save and for the pyramid layers to fully load.

Image Display Options
Image Enhancement Controls
Enhancement tools interactively control the amount of brightness, contrast, stretch, and transparency for the selected image layer. For each tool you can click and drag the slider, or enter a value in the adjacent field. You can control the Brightness, Contrast, Sharpness and Transparency. You can also apply different stretch types to enhance the appearance of an image. All of these enhancements are temporary and do not alter the original data.
- Explore the Brightness, Contrast, Sharpness and Transparency image enhancements controls for the images. Setting can be reset to the defaults by clicking the
reset icon. Use these tools to visualize and compare the images. Adjust the setting to the desired look.
- Locate the Contrast Stretch drop-down in the main toolbar and try all of the different contrast stretches. If you are unhappy with the contrast stretch you can always click the "Reset Stretch Type" icon
to restore the contrast to the default setting. The Custom Contrast Stretch
also allows you to apply custom contrast stretches using the histograms as a guide. This tool allows the
user to set the minimum and maximum value for each color channel (Red, Green, Blue) that the contrast stretch is applied. Experiment with the different contrast stretch types and select one (either custom or pre-set). 
Changing Band Combinations
ENVI 6 includes the Dynamic Band Selection tool, which allows you easily change the RGB band combination for the selected raster in the view. The Dynamic Band Selection controls appear at the bottom of the Layer tab when a raster file is open.

- Make sure you have the stacked Sentinel-2 image selected in the Layer Manager, then navigate to the Layer tab in the lower right hand corner. This is where the band selection tool is located. Start by selecting different preset band combinations from the list, to do this, click the drop-down arrow next to the sliders
. Try a few different preset composites.
- Now try making your own band combinations. To make your own band combinations, click and drag the slider bars for red, blue, and green to select the bands to use for each display color. Select what ever band composite you would like to move forward with or stick with a true color composite. You can always change this at any time!

Spectral Profiles
Now we will use the spectral profile tool to compare the spectral profiles of several different land cover features. A spectral profile (also called a spectral signature or spectral reflectance curve) is the graph of reflected electromagnetic energy from a surface across different wavelengths of the electromagnetic spectrum. Materials (soil, vegetation, water, minerals, man-made surfaces) interact with incoming solar radiation differently depending on their physical and chemical properties.
- Make sure you have the stacked Sentinel-2 image selected in the Layer Manager, then click the Spectral Profile icon on the toolbar or select Display → Profiles → Spectral from the menu bar. This opens the Spectral Profile window and by default it plots the spectral profile of the pixel in the center of the screen of the selected data file. Explore spectral profiles of different areas in the image by clicking on the image to move the cross-hairs.
- After exploring spectral profiles collect a spectral profile of the water in one of the reservoirs. Update the name of the profile (to something like Water) by clicking on the Curve tab the update the name and color etc.
- Now collect a second spectral profile of some type of agriculture. To do this, hold down the Shift button and click to collect a second profile. After collecting the second profile, update the name and color for the profile. Collect third profile of bare ground or rock. You may collect additional profiles if you like, just be sure to properly label each profile. You should have three spectral profiles total.
- Stylize and export a spectral profile chart after collecting at least three profiles. Your spectral profile chart should show the profiles, include a legend and updated the series names and axes as appropriate. Export your spectral profile chart as a JPG or export the data and create your graph using Excel or Google Sheets. See GSP 216 Lab 3 and Lab 8 for reference.
Measuring Features & Creating Region of Interests
If an image is georeferenced to a standard map projection, you can measure the distance between objects using the Mensuration tool in ENVI. This is an easy way to quickly track and measure changes in the landscape. The Region of Interest Tool (ROI) is an excellent tool to map and measure area. We will use the tools to measure the waterline recession and total surface area of the Elephant Butte Reservoir.
Measure Linear Distances
- Use the "Go To" tool in the main toolbar to jump to a specific location in an image and to center the current image window view over that location. Enter the following coordinates in the Go To field : 33.1816492, -107.20519787 and press enter. These coordinates are the approximate location of the top of the boat launch of the Elephant Butte Reservoir . You may need to increase the zoom level to
- Use the Mensuration tool to measure the distance from the top of the boat launch to the current shoreline. Click the Mensuration button
in the toolbar. Red cross-hairs appear in the display, and the Cursor Value dialog appears. Click on the first point to start the measurement and drop a subsequent points to measure a distance. Right click and select accept.
- The measurement will show up as an Annotation. You can see the measurement value in the Cursor Value menu and you can change the measurement units as you see fit. Write down or copy the measured valued. Close the cursor value window when you are done. You can uncheck the annotation or remove it in the Layer Manager if you would like.
Create ROIs and Calculate Area
Regions of Interest (ROIs) allow you to select specific areas of rasters. The ROIs can be saved and used for a variety of purposes, including calculating statistics, area and subsetting images. ROIs can be created from geometry or by pixels. ROIs are vector files, which are coordinate-based data models that represent geographic features as points, lines, and polygons. While ROIs are an ENVI data type, they can also be exported as Shapefiles.
- Now we will map and measure the current area of the Elephant Butte reservoir in the image. Change the band combinations to a false color composite that makes water stand out from the surrounding land. Right-click on the file in the Layer Manager, and select New Region of Interest (ROI).
- In the ROI window, create a Multi Part Polygon ROI and name the ROI appropriately.
We will use the Magic Wand tool to grow ROI polygons from one or more "seed" pixels. This tool facilitates drawing ROI polygons around complex objects such as clouds, tree crowns, and lakes. With the Region of Interest (ROI) Tool displayed, hold down the Ctrl key and click on a pixel inside of water. An initial polygon is drawn, and the Magic Wand Parameters dialog appears. You can adjust the threshold and experiment with other parameters to better refine the shape of the object.
Try checking and unchecking the Use Pyramids option and see how the area changes.
- Add additional areas to the ROI by holding down Ctrl key and clicking a the new region. Once you are happy with your ROI selection (aim to select the entire lake area but no other features), right click and select "Accept Multipart". If there are "holes" or gaps in the ROI, select "Remove Holes" if you would like then Accept the Polygon.
- Click the Ruler icon in the ROI window to see the area for feature. Change the units and record the area in either acres or hectares.
See GSP 216 Lab 5 for review.
Export Images
- Using the display options, adjust your images and layers to create two figures. Your figures should show the 1) Satellite image 2) Satellite image with the ROI overlayed on the layer. You may use any color composite that you like. When including the ROIs, I recommend adjusting the transparency of the ROIs for visual effect. Use the "Chip to View" option in ENVI to save the current view as an images that can shared or placed in a report. This option is very similar to taking a screenshot. To Chip a View
Go to File > Chip View To >File in ENVI. Select "JPEG" as the output file type and uncheck "Display Results."
- Repeat the process for the other image. The views will export exactly how they look on the screen in terms of zoom and size. For other export options see Saving and Export in Files in ENVI.
Chip to Power Point Options
Another way of creating figures is to use the Chip ENVI Views to PowerPoint option. ENVI provides predefined templates that provide the layout and elements of the presentation, such as text, images, north arrow and locator maps. You can customize the configuration of a predefined template and save it to a new file, and you can also create and configure a custom PowerPoint template from scratch.
- Display the Sentinle-2 image area you want to chip in one view or multiple views. You can use the Zoom, Pan, Rotate, and enhancement tools to customize the display. Layers can also include images, vectors, regions of interest (ROIs), etc.
- From the menu bar, select File > Chip View To > Power Point. Or click the Chip To Power Point button
in the toolbar. The Chip to Power Point dialog appears.
- Select an option from the Target Presentation drop-down list: Choose (Start a new presentation) to chip the views to a new Power Point presentation. If you already have a Power Point presentation open, choose one of them as the target.
- Select a predefined slide template from the Template drop-down list, then click the Configure Template button. See Chip ENVI Views to Power Point for more information about the templates and configurations.
- Click the Chip button. The views are chipped to a new slide in the selected presentation. Try out several different templates, you can try different templates and they will be added to the existing Power Point presentation. Choose one of the Templates that includes a locator map (most of the templates do).
- Review the slides in PowerPoint and decide on one slide and edit the slide as appropriate with the updated location, titles and other information. Save the slide as a JPG using the Save As function in Power Point.
- Review the lab requirements below to make sure you have all of the necessary information, then close ENVI. Back up your Finals folder and other data as desired. I recommend zipping the folder and then transferring to Google Drive or a transferring to entire folder the your student folder on the Z: Drive.
Turn In
A document with:
- Table showing the spectral, spatial resolution, date, sensor and projection/coordinate system of data. The table should be formated appropriately and include a caption.
- Figures
- Spectral Profile graph comparing the reflectance profiles for three features (water, agriculture, bare ground/rock). The graph should have axes labeled and included a legend.
- Sentinel-2 image with color composite of your choice
- Sentinel-2 image with ROI of the current extent of the Elephant Butte Reservoir
- Chip to View Figure created in Power Point that includes the satellite image, reference map and other labels/text.
- The approximate linear distance from the top of the Elephant Butte Reservoir boat launch to the waterline.
- The area in acres or hectares of Elephant Butte Reservoir.