Landsat Missions

If gap mask files are not provided with the Landsat 7 data, can I create my own?

You are here

Question:

If gap mask files are not provided with the Landsat 7 data, can I create my own?

Answer:

Yes. Since pixels with missing data have digital number (DN) values of 0, you can differentiate between valid and missing data pixels using a number of different remote sensing software packages. A gap mask can then be created to show where valid and missing data pixels are located.

Below is the process to to create a gap mask, using ENVI 5.2. (Please note that this does not signify an endorsement by USGS EROS, as we cannot endorse any specific remote sensing software. Other remote sensing software packages may also contain similar functionality.)

  • Open ENVI 5.2
  • Click File -> Open
  • Select the file for which a gap mask is to be created and click Open
  • Right-click on the image file name and select New Raster Color Slice
  • Select the file for which a gap mask is to be created and click OK
  • Above the table of values, click Clear Color Slices
  • Then click Add Color Slices two times to create two color ranges
  • Within the first range, input a value of 0 for both Slice Min and Slice Max
  • You can choose to either leave the default color or choose a different color for the missing data pixels
  • If you would like to change the color, right-click the color box and select Edit Color
  • In the second range, input a value of 1 for Slice Min and 255 for Slice Max
  • You can choose to either leave the default color or choose a different color for the valid data pixels
  • If you would like to change the color, right-click the color box and select Edit Color
  • When you are finished creating your slice, click OK
  • To save the output, right-click on Slices in the Layer Manager and choose Export Color Slices
  • Select whether you would like to save it as a Class Image or Shapefile
  • Navigate to the location you would like to save the file
  • Name the file and click Open, then click OK
  • To view the new mask file and the original image at the same time, you must create a new view
  • Select Views -> Create New View
  • In the new view, click File -> Open -> Navigate to your newly created Color Slice and click Open
  • Select Views -> Link Views -> Make sure Geo Link is selected and click Link All and click OK
  • The gap mask and original data are now linked

About

Landsat represents the world's longest continuously acquired collection of space-based moderate-resolution land remote sensing data. Four decades of imagery provides a unique resource for those who work in agriculture, geology, forestry, regional planning, education, mapping, and global change research. Landsat images are also invaluable for emergency response and disaster relief.

 

Contact Us

Landsat Updates

The Landsat Update is an informal communication tool, prepared periodically and distributed electronically to USGS Landsat partners, to provide information about Landsat activities and related topics of interest.

Accessibility FOIA Privacy Policies and Notices

USA.gov logo U.S. Department of the Interior | U.S. Geological Survey
URL: https://landsat.usgs.gov
Page Contact Information: Ask Landsat
Page Last Modified: 11/29/16 03:03 pm
Sitemap