What is Raster Data?

What is Raster Data?

Raster data is a continuous matrix or array of data numbers (DN's).  The values can represent the brightness of an object (optical imaging), the temperature of an object (thermal infrared imaging), elevation (Digital Elevation Models),thematic data (Classification image), and many others.  

DN's of an image file can vary greatly depending on what it is representing. For example, brightness and temperature may be represented with floating point numbers (e.g. 28.50) while elevation may be represented with integer numbers (e.g. without decimal points or 3500) and classification images may be represented with byte numbers (similar to integer but can only range from 0-255).

Computers, when used to read data files, can recognize the values in the file but additional information is required in order to correctly represent the image.  This is often referred to as the format of the data file.

ENVI can read a variety of formats such as GeoTIFF, DIMAP, NITF, HDF, and many others.  Most of these formats include metadata that accompanies the file or is embedded in the file itself.  ENVI also has its own format that is a flat binary file (a binary file with no header information embedded in the file) that is accompanied by a header file (.hdr).  ENVI format files often have an extension of .dat but can also have an extension of .img or none at all. Regardless of the format, information about the format of the file must be present in order for ENVI to read the file. The following information is required by ENVI in order to read and display the file appropriately:

  • the number of Samples (columns) and Lines (rows) of the raster 
  • the number of Bands (1-n) of the raster
  • the Data Type or number of bytes per pixel needed to store the data        
    • Byte is an 8-bit unsigned integer that ranges from 0-256
    • Integer (signed and unsigned) is a 16-bit integer that can represent up to 65535 values
    • Long (signed and unsigned) is a 32-bit integer that can represent up to 4,294,967,296 values
    • Float is a 32-bit, single-precision, floating point number in the range of +/-1038 with 6-7 significant digits
    • Double is a 64-bit, double-precision floating-point number in the range of +/-10308 with 14 significant digits
    • Complex is a real-imaginary pair of single or double-precision floating point numbers used in signal processing and frequendcy domain filtering
  • the Interleave of the raster describes how the data are ordered in the file
    • BSQ is band sequential which means the data are stored line by line for each band in sequence. 
    • BIL is band interleaved by line which means the data are stored for each line in each band before moving to the next line
    • BIP is band interleaved by pixel which means the data are stored for each pixel in each band before moving to the next pixel in line

  • the File Type of the raster tells ENVI if the raster is a TIFF, HDF, ENVI, etc. so that ENVI knows how to extract the data and metadata from the file
  • the Offset of the raster tells ENVI there is embedded header information in the file and to get to the actual data, start reading the data after the offset amount.  This is usually set if the File Type is something other than ENVI.
  • the Byte Order of the raster tells ENVI how the bytes of the data are ordered which can be different depending on the operating system the file was created on
    • Host – least significant byte first – “little endian” (Intel based systems such as Windows, OSX, Linux)
    • Network – most significant byte first – “big endian” (UNIX system such as Solaris)

With the above information, ENVI can read and display nearly any data file.  You can view this information by using the Edit ENVI Header tool.

Reviewed 8/25/2014 MM