Whitebox GAT's native raster file format is a legacy of its predecessor, the Terrain Analysis System (TAS). Raster data are stored using two files, a text (ASCII) header file with a .dep extension, and a similarly named binary data file with a .tas extension. An example of the header file is as follows:
Data Type: float
Z Units: meters
XY Units: meters
Projection: Not Specified
Data Scale: continuous
Display Min: 191.425
Display Max: 210.000
Preferred Palette: high_relief.plt
Metadata entry: Created by the Whitebox Raster Calculator Multiply function
Metadata entry: Created on January-11-10 3;43;01 PM
The Display Min and Display Max entries in the .dep header file are used for display purposes only. These values determine the default display minimum and maximum values and can be edited for more effectual visualization of raster data sets. There are two allowable Data Type entries including 'float', indicating 32-bit floating-point data, and 'integer', indicating a file containing 16-bit integer data. The Data Scale entry has four allowable entries including 'continuous', 'categorical', 'Boolean', and 'rgb'. This entry affects how the raster image will be displayed, in particular whether it is displayed using the default continuous palette and an applied linear stretch between the display minimum and maximum values, or whether it will be displayed using the default qualitative palette with no linear stretch. Entity-type data (e.g. soil categories) should always be displayed using a qualitative palette. Notice that the data scale in the header file will be automatically updated when the user checks or unchecks the Apply Linear Stretch option on the Layer Properties tab. The data scale for an image is originally set programmatically by the tool used to create the image. Raster images with a data scale of 'rgb' are not displayed with a palette but rather are displayed using the 32-bit red-green-blue colour model (aRGB). RGB colour images are usually created from multispectral imagery using the Create Colour Composite tool or by importing an image.
The header file may contain any number of metadata entries. Common entries include the function/tool that created the raster file as well as the date and time that the file was created. These entries are usually added by the program but can also be created by users. Notice that each metadata entry must be contained on a single line and that the character ':' will be changed to ';' when the file is written and read such that the colon can be preserved for delimiting the line header (e.g. Metadata entry:) from the line data. Thus in the above example, colons in the time entry have been converted to semi-colons.
In the .tas binary file, the values are written as binary 32-bit signed floating-point numbers or 16-bit signed integer numbers, depending on the Data Type. The first record of the file corresponds to the first row of the grid. Data are stored from left to right and top to bottom. The float data type version of a .tas file has the same structure as the ESRI (ArcGIS) floating-point binary raster file (Note: the equivalent header files are however different). This is why the Import ArcGIS floating-point grid tool is one of the most efficient ways of importing data into Whitebox GAT.