This Tech Tip explains how to export DEMs and other gridded data from Arc/Info so they can be easily imported into RiverTools 3.0.
Arc/Info has commands called GRIDIMAGE and GRIDFLOAT that can be used to export grids to binary files that are easy to import into RiverTools. If the original grid contains 2-byte (16 bit) integer data, then GRIDIMAGE can be used with the BIL option set to create a binary file with the extension ".BIL". If the original grid contains IEEE 4-byte (32-bit) floating point data, then GRIDFLOAT can be used to create a binary file with the extension ".FLT". In both cases, an additional, ASCII header file with extension ".HDR" will be created that contains the georeferencing information.
A world file will also be created that contains additional and often redundant georeferencing information. World files associated with a binary file often have a 3-letter extension that is formed from the first and last letters of the binary file's extension, followed by the letter "W". Examples of such pairs are ".DEM" and ".DMW", ".BIL" and ".BLW", and ".TIF" and ".TFW". A projection file may also be created that has the extension ".PRJ". This file contains information about the map projection, if any.
Since BIL and FLT files are binary files with no header that store grid values in row major order (line by line from north to south), they are actually special cases of the RiverTools Grid (RTG) file format. Because of this, they can be used directly in RiverTools, without even changing their filename extension to ".rtg", as long as there is an RTI (RiverTools Information) file in the same directory with the same filename prefix. Since the RTG file format is generic and very efficient, there are many other file formats that are equivalent up to the additional ASCII "header" file that provides the georeferencing. Another example is the ".HGT" format that is currently used to distribute SRTM DEMs.
RiverTools can import BIL and FLT grids by choosing Import DEM > ARC Binary Raster from the File menu. As explained above, these files do not need to be renamed to be used by RiverTools, and you do not need to have copies with both the ".BIL" or ".FLT" extension and the ".rtg" extension. You may, however, want to rename them to have the extension "_DEM.rtg" to avoid confusion. Also, any associated HDR, BLW and PRJ files should be located in the same directory. RiverTools will use these to create an RTI file.
ARC BIL-format files contain unsigned 2-byte (16-bit) integers. When a DEM contains negative values, as with bathymetric DEMs, an integer value or "offset" is added in ARC to the elevation values to make then all positive or unsigned prior to saving them to a BIL file. To recover the original, signed values, it is then necessary to subtract this offset before use. This can be done by entering a nonzero offset value in the Import DEM dialog, or later using the Extract → Derived Grid → Grid Calculator. (The ability to enter an offset value was introduced in version 3.03.) However, if the original DEM contains no negative numbers and has no values that exceed 32767, then saving the values to a binary file as unsigned integers is no different than saving them as signed integers. When elevation values are saved as 2-byte integers to a RiverTools Grid file with a data type of INTEGER, they are always saved as signed integers.
Arc/Info also has commands called IMAGEGRID and FLOATGRID that do the opposite of GRIDIMAGE and GRIDFLOAT. This allows RTG files to be imported into Arc/Info. These are discussed in a separate Tech Tip.
If you have any additional questions or comments, please contact Rivix Technical Support for assistance.
Copyright (C) RIVIX, LLC. 1998-2021