Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.

Harris Geospatial / Docs Center / Using ENVI / ENVI Header Files


ENVI Header Files

ENVI Header Files

The ENVI header file contains metadata for ENVI-format images. ENVI creates a new header file whenever you save an image to ENVI raster format. The header file uses the same name as the image file, with the file extension .hdr.

Use the Metadata Viewer to view the metadata for ENVI-format images and other supported data types. Use the Edit Raster Metadata dialog to edit the metadata fields of ENVI-format images.

See the following sections:

The ENVI Header Format

The following table lists header fields in alphabetical order. Red text indicates a required field for ENVI-format files. See Example for an example header file.



acquisition time

Data acquisition time string that conforms to the ISO-8601 standard. The string can be in any of the following formats:



  • YYYY is the four-digit year
  • MM is the two-digit month
  • DD is the two-digit day
  • T separates the date and time
  • HH is the two-digit hour
  • MM is the two-digit minute
  • SS is the two-digit second
  • D is the decimal fraction of a second with up to double-precision
  • Z indicates that the time is in Coordinate Universal Time (UTC)
  • ooo is a two-digit offset in hours from UTC time. If the offset is negative, a minus symbol (-) precedes the value.
  • mm is an optional partial-hour offset (in minutes) from UTC time.
band names

The names of image bands.


The number of bands per image file.


Lists the bad band multiplier values of each band in an image, typically 0 for bad bands and 1 for good bands.

byte order

The order of the bytes in integer, long integer, 64-bit integer, unsigned 64-bit integer, floating point, double precision, and complex data types. Use one of the following:

  • Byte order=0 (Host (Intel) in the Header Info dialog) is least significant byte first (LSF) data (DEC and MS-DOS systems).
  • Byte order=1 (Network (IEEE) in the Header Info dialog) is most significant byte first (MSF) data (all other platforms).
class lookup

Lists class colors using RGB color definitions for classification files. For example, black is 0,0,0.

class names

Lists class names for classification files.


Defines the number of classes, including unclassified regions, for classification files.

cloud cover

Percentage of cloud cover within the raster.

complex function

Specifies the values to calculate from a complex image and to use when displaying the image, calculating statistics for the image, or writing the image to a new file. Values include Real, Imaginary, Power, Magnitude, and Phase. The default value is Power.

coordinate system string

When you save a georeferenced file to ENVI raster format, ENVI adds a coordinate system string field to the header file. It lists the parameters used for a geographic coordinate system or projected coordinate system. Following are some examples:

A geographic coordinate system (for example, Geographic Lat/Lon) string contains the word GEOGCS and lists the coordinate system name, datum, spheroid, prime meridian, and units:

coordinate system string = 

A projected coordinate system string contains the word PROJCS and lists all of the geographic coordinate system parameters, plus detailed parameters that describe the projected coordinate system:

coordinate system string = 

See Coordinate System Strings for more information.

data gain values

Gain values for each band. Units are W/(m2 * µm * sr).

data ignore value

Pixel values that should be ignored in image processing.

data offset values

Offset values for each band.

data reflectance gain values

An array of reflectance gain values.

With Landsat-8 files, the reflectance gains have been scaled by the sine of the sun elevation, as follows:

data reflectance gain values = REFLECTANCE_MULT_BAND_1/sin(sun elevation)
data reflectance offset values

An array of reflectance offset values. With Landsat-8 files, the reflectance offsets have been scaled by the sine of the sun elevation, as follows:

data reflectance offset values = REFLECTANCE_ADD_BAND_1/sin(sun elevation)

data type

The type of data representation:

  • 1 = Byte: 8-bit unsigned integer
  • 2 = Integer: 16-bit signed integer
  • 3 = Long: 32-bit signed integer
  • 4 = Floating-point: 32-bit single-precision
  • 5 = Double-precision: 64-bit double-precision floating-point
  • 6 = Complex: Real-imaginary pair of single-precision floating-point
  • 9 = Double-precision complex: Real-imaginary pair of double precision floating-point
  • 12 = Unsigned integer: 16-bit
  • 13 = Unsigned long integer: 32-bit
  • 14 = 64-bit long integer (signed)
  • 15 = 64-bit unsigned long integer (unsigned)
default bands

Indicates which band numbers to automatically load into the Data Manager Greyscale or R, G, and B fields every time the file is opened. By default, a new image is automatically loaded when a file that has default bands defined in its header is opened. If only one band number is used, then ENVI loads a greyscale image.

default stretch

Determines what type of stretch (% linear, linear range, Gaussian, equalization, square root) to use when ENVI displays the image.

dem band
Index (starting at 1) of a selected DEM band associated with the image. The dem band is not written if the DEM file contains a single band, or if the first band of an image was chosen. In these cases, the dem band value defaults to 0.
dem file

Path and filename of a DEM associated with the image.


A string describing the image or the processing performed.

file type

The ENVI-defined file type, such as a certain data format and processing result. The available file types are listed in the filetype.txt file (see File Type File). The file type ASCII string must exacly match an entry in the filetype.txt file, including the proper case.


Lists full-width-half-maximum (FWHM) values of each band in an image. Units should be the same as those used for wavelength and set in the wavelength units parameter.

geo points

Geographic corners for non-georeferenced files. Enter one to four locations. Each location must contain the following items, in this order:

pixel_x_coordinate, pixel_y_coordinate, latitude, longitude

For example:

geo points = {
1.0000, 1.0000, 32.89380137, -117.07201460,
1002.0000, 1.0000, 32.87364744, -116.95855862,
1.0000, 1002.0000, 32.80628336, -117.09960891,
1002.0000, 1002.0000, 32.78615422, -116.98625969}

Pixel coordinates [1,1] correspond to the top-left corner of the image.

header offset

The number of bytes of embedded header information present in the file. ENVI skips these bytes when reading the file. See Row Offsets for more information. The default value is 0 bytes.


Refers to whether the data interleave is BSQ, BIL, or BIP.


The number of lines per image for each band.

map info

Lists geographic information in the following order:

  • Projection name
  • Reference (tie point) pixel x location (in file coordinates)
  • Reference (tie point) pixel y location (in file coordinates)
  • Pixel easting
  • Pixel northing
  • x pixel size
  • y pixel size
  • Projection zone (UTM only)
  • North or South (UTM only)
  • Datum
  • Units

See Enter Map Information for Georeferenced Files for further details.

pixel size

Indicates x and y pixel size in meters for non-georeferenced files.

product type

Indicates the product type. For WorldView and QuickBird products, valid values include:

  • Basic Product
  • Stereo Product
  • Standard Product
  • Orthorectified Product
  • Digital Elevation Model Product

For NPP VIIRS products, valid values include:

  • EDR
  • SDR
projection info

If you defined a custom projection in ENVI Classic, this field contains that map information. A projection info line is added to the ENVI header file if the image uses a user-defined projection instead of a standard projection defined in the file map_proj.txt file of the ENVI distribution. If the header file contains a coordinate system string field, any existing projection info line information is ignored.

read procedures

Spatial and spectral read routines that define custom file readers.

reflectance scale factor

The value that, when divided into your data, would scale it from 0-1 reflectance. For example, if the value of 10,000 in your data represents a reflectance value of 1.0, enter a reflectance scale factor of 10,000.

rpc info

Lists rational polynomial coefficient (RPC) geolocation information for files that have RPC reference information instead of a standard map projection.


The number of samples (pixels) per image line for each band.

security tag
A string with security information inherited from formats that typically contain security classification levels (such as NITF).
sensor type

Instrument types, such as Landsat TM, SPOT, RADARSAT, and so on. The available sensor types are listed in the sensor.txt file described in ENVI Sensor File. The string must exactly match an entry in the sensor.txt file, including proper case.

solar irradiance

Top of the atmosphere solar irradiance per band. Units are W/(m2 * µm).

spectra names

A comma-separated list of spectra names enclosed in {curly brackets}; for spectral library files only.

sun azimuth

Angle of the sun (in degrees) from due north in a clockwise direction.

sun elevation

Angle of the sun (in degrees) above the horizon.


Lists the center wavelength values of each band in an image. Units should be the same as those used for the fwhm field and set in the wavelength units parameter.

wavelength units

Text string indicating the wavelength units. ENVI accepts the following strings:

x start
y start

Defines the image coordinates for the upper-left pixel in the image. Images that are spatial subsets of larger images often use an image coordinate system that references the parent (or larger) image so that you can link and dynamically overlay the two images. The default values for the upper-left pixel are (0,0).

The reference (tie point) pixels in the map info header field are one-based.

Changing these values does not affect the way ENVI reads the image data from the file.

z plot average

The number of pixels in the x and y directions to average for Z plots.

z plot range

The default minimum and maximum values for Z plots.

z plot titles

The x and y axis titles for Z plots.


The following is a typical ENVI header file. Not all available fields are listed:

description = {
  Registration Result. Method1st degree Polynomial w/ nearest neighbor [Wed Dec 20 23:59:19 1995] }
samples = 709
lines   = 946
bands   = 7
header offset = 0
file type = ENVI Standard
data type = 1
interleave = bsq
sensor type = Landsat TM
byte order = 0
map info = {UTM, 1, 1, 295380.000, 4763640.000, 30.000000, 30.000000, 13, North}
z plot range = {0.00, 255.00}
z plot titles = {Wavelength, Reflectance}
pixel size = {30.000000, 30.000000}
default stretch = 5.0% linear
band names = {
 Warp (Band 1:rs_tm.img), Warp (Band 2:rs_tm.img), Warp (Band 3:rs_tm.img), Warp (Band 4:rs_tm.img), Warp (Band 5:rs_tm.img), Warp (Band 6:rs_tm.img), Warp (Band 7:rs_tm.img)}
wavelength = {
  0.485000,  0.560000,  0.660000,  0.830000,  1.650000, 11.400000,  2.215000}
fwhm = {
 0.070000, 0.080000, 0.060000, 0.140000, 0.200000, 2.100000, 0.270000}

Classification files include the following additional keywords:

classes = 4
class lookup = {  0,  0,  0,255,  0,  0,  0,255,  0,255,255,  0}
class names = {
  region 1,
  region 2,
  region 3}

Spectral library files include the following additional keywords:

spectra names = {

You can create an ENVI header file using a text editor. The file must start with the text string ENVI for ENVI to recognize it as a native file header. Keywords within the file indicate critical file information.

You can add comments to the file by inserting a line with a semicolon as the first character. ENVI ignores these lines when parsing the header file. Comments begin with a semicolon and must be on their own line. Comments can appear anywhere within a header file except within keyword/value brackets:

  band names = {
    ; comment
    Band 3

See Also

Optional ENVI Header Fields, View File Metadata, Edit Raster Metadata, Supported Data Types, ENVIRasterMetadata (API), ENVIRaster::WriteMetadata (API)

© 2017 Exelis Visual Information Solutions, Inc. |  Legal
My Account    |    Buy    |    Contact Us