This tool can be used to import a number of generic multiband image data formats, including band interleaved by line (BIL), band interleaved by pixel (BIP), and band sequential (BSQ), to Whitebox GAT raster file format. This tool supports import of 8-bit, 16-bit, and 32-bit integer data structures and the 32-bit floating-point file structure. The data file (*.bil, *.bip, or *.bsq) must be accompanied by a header file, containing ancillary information needed to properly import the pixel information. This ASCII text file must be contained in the same directory as the data file and must have the same name, but with a .hdr file extension. For example, the file image.bil will need an accompanying image.hdr header file. The header file contains several manditory keywords and value entries and may contain a number optional entries as well. An example of a header file for a multiband image data file follows:
BYTEORDER I
LAYOUT BIL
NROWS 456
NCOLS 513
NBANDS 1
NBITS 16
BANDROWBYTES 1026
TOTALROWBYTES 1026
PIXELTYPE INT
ULXMAP -90.6359722199807
ULYMAP 37.8306944437743
XDIM 0.000277777777799936
YDIM 0.000277777777799932
NODATA -32767
XYUNITS DEGREES
ZUNITS METRES
PROJECTION GEOGRAPHIC
In the above example, the key words BYTEORDER, NROWS, NCOLS, NBANDS, and NBITS are manditory entries, while the remaining entries are optional. If the entries required to build the coordinate information of the imported image, i.e. the x- and y-coordinates of the upper left-most pixel (ULXMAP and ULYMAP) and the pixel size in the x and y directions (XDIM and YDIM), are not specified in the header file, then they must be contained in a third file, known as a World File. Like header files, World Files are commonly associated with multiband image data and are generated by many geospatial software packages. Keywords and their entry values are seperated by one or more spaces and not tab indents. BYTEORDER refers to the endianness of the data file and can be either 'I' (Intel order or little-endian) or 'M' (Motorola or big-endian). If the BYTEORDER is set to 'M' byte-swapping will be used to import the data correctly. PIXELTYPE is an optional keyword and is set to either INT or FLOAT and is important for distinguishing between 32-bit integers and 32-bit floating-point data. Notice that the pixel size in the x and y directions must be the same.