Вы находитесь на странице: 1из 218

Users Guide

RiverTools Version 3.0


November, 2003 Edition
Copyright 2003
RIVIX Limited Liability Company

Restricted Rights Notice


The RiverTools software program and the accompanying procedures, functions,
and documentation described herein are sold under license agreement. Their use,
duplication, and disclosure are subject to the restrictions stated in the license agreement. RIVIX, LLC, reserves the right to make changes to this document at any time
and without notice.

Limitation of Warranty
RIVIX, LLC makes no warranties, either express or implied, as to any matter not
expressly set forth in the license agreement, including without limitation the condition of the software, merchantability, or fitness for any particular purpose.
RIVIX, LLC shall not be liable for any direct, consequential, or other damages suffered by the Licensee or any others resulting from use of the RiverTools or IDL
software packages or their documentation.

Permission to Reproduce this Manual


If you are a licensed user of this product, RIVIX, LLC grants you a limited, nontransferable license to reproduce this particular document provided such copies are
for your use only and are not sold or distributed to third parties. All such copies
must contain the title page and this notice page in their entirety.

Acknowledgments
RiverTools is a trademark of RIVIX, LLC.
IDL is a trademark of Research Systems Inc., registered in the United States Patent and Trademark Office.
Other trademarks and registered trademarks are the property of the respective trademark holders.

Contents
Chapter 1:
Overview of RiverTools ................................................................. 7
Starting RiverTools .............................................................................................. 13
Opening a Data Set .............................................................................................. 14
Importing a DEM ................................................................................................. 16
Setting Preferences .............................................................................................. 19
Setting Colors ...................................................................................................... 26
Top 10 Things You Should Know About DEMs ................................................ 28
Mosaicking and Subsetting DEMs ...................................................................... 36
Extracting Drainage Networks from DEMs ........................................................ 40
Extracting Other Information from DEMs .......................................................... 45
Interacting with an Image .................................................................................... 47
Saving Graphics as PostScript ............................................................................. 53
Saving Graphics Windows as Images .................................................................. 55

RiverTools Users Guide

Creating Multi-Layer Plots .................................................................................. 57


Exporting Data ..................................................................................................... 59
Adding Extensions ............................................................................................... 62
Recommended Reading ....................................................................................... 64

Chapter 2:
How to Use the RiverTools Dialogs ........................................... 75
The File Menu ...................................................................................................... 76
The Prepare Menu ................................................................................................ 88
The Extract Menu ................................................................................................ 95
The Display Menu ............................................................................................. 110
The Analyze Menu ............................................................................................. 122
The Window Menu ............................................................................................ 135
The User Menu .................................................................................................. 136
The Help Menu .................................................................................................. 138

Chapter 3:
Elevation Data Sets and Formats ............................................. 139
Australian Geodata 9-Second DEM .................................................................. 141
CDED (Canadian Digital Elevation Data) ......................................................... 142
DTED (Digital Terrain Elevation Data) ............................................................ 143
ETOPO5 ............................................................................................................. 144
GeoTIFF ............................................................................................................. 145
GLOBE (Global Land One-km Base Elevation) ............................................... 146
GMT / netCDF ................................................................................................... 147
GTOPO30 .......................................................................................................... 148
IBCAO Arctic Bathymetry ................................................................................ 149
LIDAR Data (Light Detection and Ranging) .................................................... 150
MOLA (Mars Orbiter Laser Altimeter) ............................................................. 151
NED (National Elevation Dataset) .................................................................... 153
NOAA/NOS EEZ Bathymetry ........................................................................... 154
SDTS Raster Profile ........................................................................................... 156
SRTM (Shuttle Radar Topography Mission) ..................................................... 158
Contents

RiverTools Users Guide

USGS Standard .................................................................................................. 160

Appendix A:
RiverTools Files and Formats ................................................... 163
RiverTools Grid (RTG) Files ............................................................................. 164
RiverTools Sequence (RTS) Files ..................................................................... 166
RiverTools Mask (RTM) Files .......................................................................... 167
RiverTools Vector (RTV) Files ......................................................................... 170
RiverTools Information (RTI) Files .................................................................. 172
Other RiverTools Files ....................................................................................... 174

Appendix B:
RiverTools Glossary .................................................................. 175

RiverTools Users Guide

Contents

Contents

RiverTools Users Guide

Chapter 1:

Overview of RiverTools
Topography represents different things to different people. To a hydrologist or watershed manager, topography is what controls the flow of water and contaminants,
records the nested 3D geometry of basins and networks, organizes biologic communities and determines the amount of solar radiation received at a given location. To a
geologist or geomorphologist, topography is a record of past events and erosional
processes and it poses a challenge to understand the physical relationship between
function and form. To military planners and urban developers, topography determines
visibility and represents the surface they have to contend with. To hikers and snowboarders, topography represents breathtaking scenery and an endless source of recreation.
The information age has brought us gridded elevation data sets called DEMs (Digital
Elevation Models) and a variety of different software tools that can do things with
topographic data in the form of DEMs. An important difference between RiverTools
and other software is that it uses digital elevation data not only to make attractive
maps and images, but also to make measurements and to derive a treasure trove of
quantitative information that is useful to scientists, students, planners and other professionals. For example, RiverTools makes it easy to get accurate measurements for

Chapter 1: Overview of RiverTools

things like the lengths and slopes of channel segments, the number of streams of a
given order, the contributing area of a watershed, the shape of a longitudinal profile, a
basins hypsometric curve, topographic wetness indices, the flow distance to a feature
of interest and the shape of a basin. If your DEM data is given in Geographic coordinates (latitude / longitude), the latitude-dependence of measurements is taken into
account using the currently selected ellipsoid model. You can also export channels,
basin boundaries and their measured attributes in formats that can be ingested into a
general-purpose Geographic Information System (GIS) or spreadsheet program.
While RiverTools provides a specialized set of tools for the analysis of topography,
watersheds and river networks, it also offers much of the functionality you would
expect to find in a less-specialized Geographic Information System (GIS). This
includes support for map projections, UTM and Geographic data, ellipsoid models,
publication-quality graphics, import and export of many raster and vector formats, an
integrated scripting language, cross-platform support, large data set support, customization features, an extensive online help system and state-of-the-art visualization
tools. Designed to tackle real-world problems, it remains surprisingly easy to use and
has proven to be a great tool for teaching classes on hydrology and geomorphology.
RiverTools is written in a powerful, array-based language called IDL, which stands
for Interactive Data Language. You can either purchase RiverTools by itself, or you
can also purchase IDL from Research Systems, Inc. and use it together with RiverTools. With the latter option, you have the full power of the IDL language in addition
to all of the convenient and specialized tools in RiverTools. This allows you to extend
RiverTools by writing your own routines or sharing routines with others. This powerful feature is explained later in this chapter in the section called Adding Extensions.
With both RiverTools and IDL you can also run IDL and RiverTools commands at the
IDL command line during a RiverTools session. Documentation for nearly one hundred RiverTools commands is available from the online Help. These commands can
be viewed as a specialized extension of the IDL language. RiverTools plus IDL provides a rich environment which can be quickly extended to tackle new problems and
to create physically-based rainfall-runoff models.
A typical project consists of four key components which are reflected by the Prepare,
Extract, Display, and Analyze menus in the RiverTools menu bar.
The Prepare menu contains a variety of tools that simplify the task of preparing input
data from different sources. A DEM mosaicking tool, Patch RTG DEMs, is also
included in this menu.
The Extract menu tools are used to extract information from your input data, such as
measurements and derived quantities. This information is organized and saved into a
collection of files that allow fast access to the information you need, even if your data
set is large. Some of these preprocessing routines have a lot of work to do and may
RiverTools Users Guide

Chapter 1: Overview of RiverTools

take quite a while for very large data sets. RiverTools prints detailed information
about what it is doing in the output log of the main window. Some of this information
is also saved automatically in a log file with the extension .log.
The Display menu provides many different tools to help you visualize the region you
are studying and the spatial properties of the objects contained in this region. Most of
the graphics windows that you create via these dialogs have a Tools pull-down menu
at the top edge with several window tools that allow you to interact with the images
in various ways.
The Analyze menu contains tools for the quantitative analysis of the many measurements that can be made with tools in the Extract menu. These tools let you perform
various kinds of statistical analysis on your data, and let you create various kinds of
plots that show how different measurements are related to one another.
In addition to the Prepare, Extract, Display, and Analyze menus, there is a File menu
which contains a variety of tools for helping you to manage your work, a Help menu
which offers you a variety of different options for getting help when you need it, a
Windows menu that helps you to manage windows, and a User menu that allows you
to extend RiverTools with your own routines. (For more information, see Adding
Extensions on page 62.) Throughout this guide and in the online help, the path
from the menu bar to a specific dialog is indicated by chaining together menu options
with the greater than symbol. For example, the path to the Horton Plot dialog is:
Analyze Strahler Streams Horton Plot. This means that to open the Horton
Plot dialog you must

Click the Analyze button on the menu bar to get a pull-down menu,

Choose Strahler Streams from this menu to get another pull-down menu, and

Choose Horton Plot from this menu to open the dialog.

Learning how to use new software can seem like a daunting task. Some of the most
common problems with learning new software are:
1. not knowing what a particular word or phrase means in a dialog,
2. not knowing the purpose of a dialog,
3. expecting things to work in a different way,
4. lack of consistency throughout the application, and
5. not knowing how to do what you want to do.

RiverTools Users Guide

10

Chapter 1: Overview of RiverTools

In RiverTools, every effort has been made to address these issues so that it will be
easier and more enjoyable for you to learn how to use the software. For example, the
best way to address the first issue above is to provide a searchable, cross-referenced,
glossary that focuses more on concepts, rather than just basic definitions. This glossary can be accessed from the Help menu and you are encouraged to use it often. A
good glossary is perhaps the most efficient way to learn about something new. It can
also be viewed as an agreement between an author and a reader as to what certain
terms will be taken to mean in the current context, even if this differs somewhat from
their more standard meanings.
The second issue above is tackled in two different ways. First, many dialogs contain a
Help button at the bottom that gives a quick synopsis of what the dialog is for and
how it works. Second, each dialog is explained in more detail in Chapter 2, How to
Use the RiverTools Dialogs and the online Help. Select Dialogs from the Help menu
to read the searchable, online version.
The third issue above has been addressed by adhering to familiar software conventions, and by grouping related tools and options together.
You will notice that consistency, the fourth issue, was also an important design consideration. For example, RiverTools contains a variety of different commands that
you can execute from the IDL command line, and these all follow a consistent naming convention. User-accessible command names follow these five rules:
1. command names start with RT_
2. separate words are separated by underscores,
3. words are not abbreviated (except certain acronyms like DEM),
4. the first word is a verb, and
5. the remaining words are adjectives or nouns.
Examples include RT_Read_DEM_Info, and RT_Extract_Flow_Grid.
Last, but certainly not least, there is the fifth issue. This chapter (which is also available via the Special Topics entry in the Help menu) gives step by step instructions on
how to perform many common tasks. Notice, for example, that there is a section
called Extracting Drainage Networks from DEMs on page 40. You should definitely read this section since it summarizes one of the most important capabilities of
RiverTools. Another way to get unstuck is to use the online Help Glossary. For example, if you wanted to create a flow grid, you could look up flow grid in the Glossary.
There you will find some background, a definition, and brief instructions on how to
create a flow grid with RiverTools. Similarly, you could get help on how to create a
PostScript file by looking up the word PostScript.
RiverTools Users Guide

Chapter 1: Overview of RiverTools

11

Dont forget that the best way to learn is to explore. Many sample data sets are
included in the Basins folder in the RiverTools folder and on the sample data CD that
comes with RiverTools. These data sets represent some of the most interesting topography around and are a great way to find out what RiverTools can do. You should
store your own data sets in a different folder, just to make sure that you dont lose any
data when you install a RiverTools upgrade later on. It is also recommended to store
separate data sets in separate folders within your own personal Basins folder.
Here is a brief summary of the sample data sets in the Basins folder:

Small, Kentucky River, Kentucky


The DEM for this data set is extremely small, but this data set is useful for illustrating
how drainage networks can be extracted from DEMs. This data set has been completely preprocessed with routines in the Extract menu. For small data sets like this,
you may want to open the Set Preferences dialog in the File menu, select Graphics
Windows from the Preference type droplist, and click on the Resize arrays by:
Bilinear option. This will result in smoother contour lines and shaded relief images,
for example.

KY_Sub, Kentucky River, Kentucky


The DEM for this data set is somewhat larger, and has also been completely preprocessed with routines in the Extract menu. This DEM contains the Beaver Creek subbasin of the Kentucky River. A higher-resolution DEM of the same region is
available on the sample data CD and makes for an interesting comparison.

Beaver Creek, Kentucky


A higher-resolution DEM (with 30-meter pixels) that has roughly the same geographic extent as the KY_Sub DEM.

Harvard Glacier, Alaska


This DEM shows that large glaciers also have branching structure, even though they
are much fatter than river networks. This data set has also been preprocessed. You
can create a filled contour plot for this DEM using the Contour Plot routine in the
Display menu that looks very similar to pictures of the Mandelbrot set, which is a
type of fractal. Many modern efforts to better understand the structural properties of
river networks, such as the self-similar tree model, involve the concept of fractals.

RiverTools Users Guide

12

Chapter 1: Overview of RiverTools

The Grand Canyon, Arizona


This DEM shows the most dramatic section of the Grand Canyon. While you can create many stunning images with this DEM and use many of the other routines in RiverTools, you cannot accurately compute the drainage network for it because the DEM
does not contain the entire drainage divide. Higher-resolution DEMs for parts of the
Grand Canyon near Powell Plateau are available on the sample data CD.

Oahu, Hawaii
This DEM shows the Hawaiian island of Oahu. The topography of Oahu is volcanic
in origin, consists of many rills or gullies, and makes a wonderful shaded relief
image.

Crater Lake, Oregon


This DEM shows the western half of Crater Lake, in Oregon, and can be used to create a variety of interesting images. The island within Crater Lake is Wizard Island.

RiverTools Users Guide

Chapter 1: Overview of RiverTools

13

Starting RiverTools
On PCs running Windows, you can start RiverTools by choosing Programs RiverTools RiverTools 3.0 from the Start menu. When you install RiverTools, a
Windows shortcut is placed on your desktop which lets you start RiverTools by double-clicking on the shortcut icon. On a Macintosh, you can double-click on the RiverTools icon in the RiverTools folder in the RIVIX folder. On Unix systems, type
rivertools at the Unix shell prompt. If you have purchased IDL 6.0 from Research
Systems, Inc. (RSI), then you can also start RiverTools by typing rivertools at the
IDL command prompt on any system. To do this, you will need to add the RiverTools
home directory to the set of paths that are maintained in the IDL Preferences dialog,
as explained in the RiverTools Tutorials.
Once RiverTools has started you will see the RiverTools main window which consists
of an output log window with the RiverTools menu bar along the top edge. If RiverTools has been installed correctly, then the RiverTools home directory will be printed
in the log window. If you have saved preferences in a previous session, then there
will be a message to tell you that your preferences have been loaded. Notice that the
current working directory is displayed in the bottom frame of the main window.
At startup, RiverTools will restore any IDL .sav files that are found in the RiverTools Menu folder. This makes it easier for users to extend RiverTools with routines
they have written or obtained from others. By editing the file user.txt that is distributed with RiverTools, this also makes it possible to make permanent additions to the
User menu.
You can resize the main window by clicking on a corner and dragging. You can also
position this window on your screen, usually by left clicking on the top frame of the
window and dragging. If you want RiverTools to use the same position and size for
the main window in future sessions, you can save this information via the Set Preferences dialog in the File menu. There you will find a category or preference type
called Main Window.

RiverTools Users Guide

Starting RiverTools

14

Chapter 1: Overview of RiverTools

Opening a Data Set


A RiverTools data set consists of a family of files that are related to or derived from
a particular digital elevation model or DEM. Filenames are constructed from two
parts, a prefix and an extension. A distinction is made between two different types of
prefix. A data set prefix is used to identify files that are associated with a particular
DEM, while a basin prefix is used to identify files that are associated with a particular basin in a DEM. There may be several basin prefixes associated with a given data
set. The Open Data Set and Change Basin Prefix dialogs in the File menu are used
to select a previously imported DEM data set and to optionally select a particular
basin which you have previously analyzed by changing the basin prefix. To import
DEMs into RiverTools, you use the File Import DEM dialog, as explained in a
subsequent section.
Since RiverTools generates and works with many different kinds of data files, it uses
a standardized set of file extensions in order to recognize and manage these files. This
allows RiverTools to do most of its work without prompting you for information. An
example of a RiverTools compound extension is _DEM.rtg, which is the extension
used for binary grid files that contain DEM data. Notice that the three letters after the
dot stand for RiverTools Grid and indicate that the file contains gridded binary data
and has the same dimensions as the DEM in this data set. The letters between the
underscore and the dot tell what kind of grid it is, which in this case is the DEM itself.
The extensions for area and slope grids are _area.rtg and _slope.rtg. In addition to
RTG files, there are RTI files (RiverTools Info), RTM files (RiverTools Mask), and
RTV files (RiverTools Vector). Some RiverTools data is stored in text files and most
of these files end in .txt, like _basin.txt. Two important exceptions are the RTI file
and a log file that ends with .log. Any binary file that does not fall into one of the
above categories ends with .dat, such as _stats.dat.
To open a data set, select Open Data Set from the File menu. This will open your
computers native file selection dialog. By default, RiverTools will use the filter
*.rtg to look for RiverTools grid files. In this case, you should select a file ending
with _DEM.rtg. However, you can also open DEM files with names that do not
have this compound extension, as long as they have the same format as a RiverTools
grid file (binary, row major, no header) and there is an RTI file with the same prefix
in the same directory. (An RTI file will exist if the DEM was previously imported
into RiverTools via File Import DEM.) To use this option, you will need to
change the filename filter. Under Microsoft Windows, the native file selection dialog
does not let you modify the filter directly, and you must instead enter a filter string in
the filename field.

Opening a Data Set

RiverTools Users Guide

Chapter 1: Overview of RiverTools

15

Note that you select a data set by selecting the associated DEM. RiverTools will get
the data set prefix from the DEM filename, and will assume that all of the files in the
given data set reside in the same folder as the DEM. Selecting an RTG file that is not
a DEM may lead to unexpected results, since the file will be interpreted as a DEM.
Note
When you open a data set, the working directory is changed to the directory which
contains the DEM file that you selected. This means that RiverTools will look in
this directory for any data files it needs, so you dont need to specify complete paths
when prompted for a filename (like in the Prepare Convert Grid dialog). This
also means that any files you create while working with the current data set (such as
extracted grids, PostScript files, and so on) will get saved in this directory by
default. Notice that the name of the current working directory is displayed in the
bottom frame of the main RiverTools window. The working directory that RiverTools starts up in is something you can change via the Set Preferences dialog in the
File menu, in the Startup Directory category.
Note that many of the routines in RiverTools will not be available to you until you
have used the DEM to create additional derived files. You will use tools in the
Extract menu to create these additional files as you work with your data set. To get
an overview of which files have already been created and which ones havent, use the
View Data Set Info dialog in the File menu. (You may have to scroll down or resize
the dialog to see all of the entries.) A complete data set will have a file for each of the
entries shown. If you try to run a routine that needs one of the missing files, you
will be notified with either an information dialog or an error message in the RiverTools output log.

RiverTools Users Guide

Opening a Data Set

16

Chapter 1: Overview of RiverTools

Importing a DEM
DEMs in many standard formats can easily be imported into RiverTools with the
Import DEM dialog in the File menu. This dialog performs two main tasks: (1) it
reads the elevation values from the original format and resaves them as a RiverTools
grid (RTG) file, and (2) it creates a RiverTools info (RTI) file that contains descriptive information for the DEM. The RTG file is a binary (row-major) file that will typically have the compound extension _DEM.rtg. This format is used to conserve
disk space and maximize processing speed. The RTI file is a plain text file with the
extension .rti that contains information about the DEM such as the number of rows
and columns and georeferencing information. Information in an RTI file can be
viewed, checked and edited with the View DEM Info dialog in the File menu.
In addition to importing DEMs from other sources, the Prepare Patch RTG
DEMs dialog allows you to create new DEMs by patching together or mosaicking
other DEMs. When used with a single DEM, the mosaicking tool makes it easy to
create a new DEM for a rectangular subregion in the input DEM by letting you select
the region with a rubber band box. See the section called Mosaicking and Subsetting DEMs later in this chapter for more information.

Step 1.
Choose Import DEM from the File menu and select the format of the DEM you
want to import from the menu. Your computers native file selection dialog will
appear to let you select the DEM you want to import.

Step 2.
Select the DEM that you want to import. After you have selected a DEM and clicked
on the Open or OK button to close the dialog, another dialog will appear that shows
(1) a breif description of the selected file format, (2) the input DEM filename, and (3)
the output DEM filename. You can edit the output DEM filename and path or click on
the Browse (output) button to select an output filename and destination.
If the selected file format is RiverTools, ENVI, ARC or flat binary, then it is already
in the format that RiverTools uses and does not need to be converted. In this case,
only an RTI (RiverTools Information) file needs to be created and the original binary
file can be used with its original name. This will be indicated in the dialog by the output filename being identical to the input filename. If these filenames are identical,
then no file copying will occur and only an RTI file will be created. However, you
can change the output filename to have the standard RiverTools extension

Importing a DEM

RiverTools Users Guide

Chapter 1: Overview of RiverTools

17

_DEM.rtg and change teh ouput destination to a different directory. This would be
necessary if you were importing a DEM from a read-only media like a CD-ROM,
because the RTI file must be in the same directory as the DEM that it describes.
If the selected file format is USGS SDTS Raster Profile or USGS Standard ASCII
then RiverTools will find the map title in the metadata and will use it to construct a
good output filename for the new DEM.
For many formats, you can import several DEMs that have the same format as a batch
job by using a single wildcard (an asterisk) in the input filename and a single matching wildcard in the output filename.

Step 3.
Click on the Start button to begin the import process. The Start button will be
dimmed and information may be printed in the output log during the import process.
For most formats, the import process finishes quickly (depending on the size of the
imported DEM) and automatically closes the dialog. The imported DEM is now the
currently selected data set and you can begin to work with it.
If you have selected a format such as Flat Binary, Gridded ASCII or Irregular ASCII
XYZ, then there is usually not enough information to create an RTI file automatically
and you will be prompted to provide it in a blank View DEM Info dialog. This information is important and will affect future calculations and operations that make use
of it. High-precision bounding box information is particularly imporant for mosaicking DEMs with the Prepare Patch RTG DEMs dialog. Even a very small error in
one of the last few (double-precision) decimal places can cause the mosaic to be off
by one pixel. The section called Top 10 Things You Should Know About DEMs on
page 28 contains information that is useful if you need to create your own RTI file.
For other formats, missing or incomplete georeferencing information will result in a
warning message. You can often use the information in the message to edit the RTI
file with the missing information. This can be done with the File View DEM Info
dialog or with a text editor. Information can be checked for basic problems with the
Check Info button in the File View DEM Info dialog.

Step 4.
In some cases you may want to perform further operations on an imported DEM,
such as converting elevation units from feet to meters, changing the data type of the
DEM, flipping the y-axis to put north at the top, or changing the byte order of the
DEM. These and many additional options are provided in the Convert Grid dialog in
the Prepare menu.

RiverTools Users Guide

Importing a DEM

18

Chapter 1: Overview of RiverTools

Note
Some custom formats include a header at the beginning of the file, followed by
binary or ASCII grid values. The File Import DEM dialog does not include an
option to skip headers when reading data in these formats. However, the Prepare
Convert Grid dialog can be used to import these DEMs, since it lets you enter a
header size, in bytes. If the header is ASCII (plain text), you should enter the total
number of text characters in the header, including spaces and end-of-line characters.
You can also use a text editor to remove ASCII headers from the beginning of a file.

Note
If you should later run the Extract Flow Grid routine, RiverTools will offer to
make a copy of your DEM in the same directory with the file extension
_rawDEM.rtg. It will then fill depressions in the file with extension _DEM.rtg but
will leave the file with extension _rawDEM.rtg untouched. This allows you to
compare the original and filled DEMs with the Display Density Plot routine, the
Channel Profile window tool, and other RiverTools routines. It also serves as a
safety net, in case you encounter any problems. You should not use the file extension _rawDEM.rtg for an imported DEM and you should not use the File Open
Data Set dialog to select a file with this extension.

Importing a DEM

RiverTools Users Guide

Chapter 1: Overview of RiverTools

19

Setting Preferences
You can change the default behavior of RiverTools in a variety of ways to suit your
own needs and preferences. If you choose Set Preferences from the File menu you
will see a bulletin-board-style dialog. A droplist of preference types or categories
is located at the top of this dialog. When you choose from this droplist, the dialog will
change to show the current settings for the category you selected. Any changes you
make in these dialogs will take effect as soon as you click on the OK button, and will
remain in effect until you exit RiverTools or change them again. If you want to use
the same preferences the next time you start RiverTools, click on the Save Preferences button. Your preferences will then be saved in a text file. For Windows and
Mac users this file is called RT30.PRF and is saved in the RiverTools menu directory.
For Unix users this will be a hidden file in their home directory called .RT30.PRF.
Clicking on the Restore Defaults button in any of the panels will reset the values in
that panel to their default values. There is a heading for each preference type below,
followed by an explanation of the settings in the corresponding panel.

Startup Directory
Note that unlike other preferences, the Startup Directory settings dont apply until
the next time you start RiverTools. This means that they will have no effect unless
you press the Save Preferences button.

Startup data directory


This is the directory that will be used as the current working directory the next time
you start RiverTools.

Startup DEM file


This is the DEM file that will be used the next time you start RiverTools.

Startup data prefix


This is the data set prefix that will be used the next time you start RiverTools.

Startup basin prefix


This is the basin prefix that will be used the next time you start RiverTools.

Get current data set info


If you want the data set you are currently using to be opened automatically the next
time you start RiverTools, click on this button. The current information will be copied
into the dialog. Dont forget to click on the Save Preferences button.
RiverTools Users Guide

Setting Preferences

20

Chapter 1: Overview of RiverTools

General
Fixed-width font
This is the font used when RiverTools displays tabular data, as in the Strahler
Stream Data Summary. The default is a fixed-width font that should be available on
your system.

Nodata threshold
Some DEMs use a negative number or the value 0 for pixels with unknown elevations. This preference determines which values are to be treated as actual elevations
in routines like Extract Flow Grid, Display Contour Plot, and Analyze
Entire Grid Area-Altitude.
All values less than or equal to this nodata threshold are treated as nodata until the
value is changed. When working with DEMs that border the sea, you should set this
value to 0 to prevent RiverTools from attempting to assign flow directions for ocean
pixels. In most other cases, the default value of -9999 is the best choice. The smallest
allowed nodata value depends on the data type of the current DEM.

Max RAM block size (KB)


RiverTools is able to process extremely large data sets, even on computers that have
limited RAM (Random Access Memory). It does this by breaking large files up into
several blocks, whose maximum size is controlled by this setting. The default is a
fairly low value that will work on almost any computer. If you have lots of RAM,
however, you should set this to a larger value, say about one-half of the amount of
RAM that you have. This will minimize unnecessary input and output to files which
will allow RiverTools to run somewhat faster.

Floating dialogs
Floating dialogs are dialogs that cannot fall beneath the main log window. In this
mode, an entire RiverTools session can be minimized into a single icon if your platform supports this behavior. However, the floating dialogs option can make it difficult to see what is printed in the main log window when many windows and dialogs
are present. Depending on your personal preferences, you may want to use the
Detached log window preference in the Main Window category to prevent this
problem.

Setting Preferences

RiverTools Users Guide

Chapter 1: Overview of RiverTools

21

Confirm exit
If you click on Yes, then every time you choose Exit from the File menu you will
see a small information dialog that asks if you are sure you want to exit RiverTools.
This can be useful if you are in the middle of a big project and want to prevent the
possibility of shutting down RiverTools by accident. Otherwise, RiverTools will shut
down silently.

Graphics Windows
Maximum window size
This size is in pixels, and should usually be set to a value between 300 and 800,
depending on your monitors resolution. (e.g. 300 is good for a 640 x 480 screen).
The default value is 0.75 times your screens smallest dimension, in pixels. This maximum size is honored by the auto-sizing routine that is usually used by RiverTools to
size graphics windows.

Resize arrays by: Nearest neighbor or bilinear


When DEMs, shaded aspect, and so on are displayed as images, they must be reduced
in size (for display purposes only) if their size is larger than the screen size. RiverTools will also automatically enlarge images created for small DEMs. There are two
interpolation schemes for doing this. The nearest neighbor method replicates the
value of the nearest neighbor while bilinear interpolation is used with the bilinear
option.

Backing Store Provider: Window system or IDL


This option determines whether backing store the mechanism by which graphics
windows are redrawn after being covered is provided by the window system or
IDL. It is usually not necessary to change the default setting.

Scrolling master windows ?


Setting this preference to Yes changes the behavior of the master windows (as
opposed to tool windows) that are created with many of the tools in the Display
menu. Instead of automatically rescaling by an integer factor, the image is displayed
at the full resolution of the DEM and scroll bars are added to the edges of the window. Any of the window tools in the Tools menu of the new, scrolling window can be
used. This can be a very useful feature, but it can be very memory (RAM) intensive
when your are working with a large DEM.

RiverTools Users Guide

Setting Preferences

22

Chapter 1: Overview of RiverTools

Window Tools
Many of the graphics windows that are created by dialogs in the Display menu have a
menu bar across the top, with menus called: Options, Tools, and Info. The Tools
menu contains a variety of tools that you can use to interact with that window. This
section of the preferences allows you to change the default settings that are used by
these tools. Many of the window tools also have a Config dialog in their own
Options menu that can be used to change settings.. Note that the Tools menu cannot
be used unless the map projection is set to the default, which is None (one-to-one).
The map projection can be changed via the Map Projection Info dialog in the Display menu.

Zoom window size


This determines the default size, in pixels, of the graphics window used for several of
the window tools such as Vector Zoom and Magnify. The default is one-half the
value of the Maximum window size preference in the Graphics Windows category.
Note that these windows can be dynamically resized by dragging on a corner.

Magnify zoom factor


This is the magnification factor used by the Magnify tool. The default is 5.

Vector zoom array size


This is the size of the square subarray that is read from your DEM in order to create
the Vector Zoom plot.

Surface zoom array size


This is the size of the square subarray that is read from your DEM in order to create
the Surface Zoom plot.

Line or box color


This is the color used by any lines (such as the line associated with the Line Profile
tool) or boxes (such as the locator box associated with each of the Zoom tools) that
are drawn as you use the window tools in a window. The default is white, which provides high contrast for most images, with the exception of contour plots that have a
white background.

Cursor type
This is the type of cursor to use for showing the region in the DEM that you are
zooming in on. The choices are Crosshairs+Box, Crosshairs only, Box only,
Crosshairs+Box #2, Crosshairs+Box #3 and Crosshairs+Circle.

Setting Preferences

RiverTools Users Guide

Chapter 1: Overview of RiverTools

23

Main Window
The main RiverTools window (which has the RiverTools menu bar across the top)
can be resized and repositioned with the mouse. This panel shows the current location
and geometry of the main window, which you can save as a preference for future RiverTools sessions.

Width in characters
The width of the main RiverTools window, in text characters.

Height in lines
The height of the main RiverTools window, in lines of text.

X-offset in pixels
The x-offset of the main RiverTools window, as measured in pixels from the upper
left corner of your computer screen.

Y-offset in pixels
The y-offset of the main RiverTools window, as measured in pixels from the upper
left corner of your computer screen.

Lines to retain
The number of lines in the main RiverTools window to maintain in the buffer. The
default is 1200 and 200 lines are removed each time this value is reached. This is also
the maximum number of lines that will be captured by the Window Save Log
Window dialog.

Detached log window


When set to Yes, messages normally sent to the main log window are sent to a separate, detached log window. If the Floating dialogs preference in the General category is set, then this new log window floats above the main log window.

Planet Info
Planet name
If the current DEM uses Geographic coordinates and is for a planet other than Earth,
you must select it here in order for lengths and areas to be computed correctly. (Only
our solar system, so far.)

RiverTools Users Guide

Setting Preferences

24

Chapter 1: Overview of RiverTools

Earth ellipsoid
If the current DEM uses Geographic coordinates (with fixed-angle pixel geometry),
RiverTools uses the ellipsoid model indicated here to compute lengths, areas, and
slopes. Prior to processing, you should choose the ellipsoid that matches the source
information for the DEMs you are using. For USGS DEMs, it is usually the GRS 80
ellipsoid (North American Datum 1983) or Clarke 1866 (North American Datum
1927).

Used by
A brief description of countries or organizations that use the current ellipsoid.

Equatorial radius
The equatorial radius (length of the semi-major axis) for the current ellipsoid. You
can edit this value, if necessary.

Polar radius
The polar radius (length of the semi-minor axis) for the current ellipsoid. You can edit
this value, if necessary.

Plotting Options
Aspect ratio (X/Y)
If the aspect ratio of a plotting window is not determined by other considerations,
(such as grid dimensions or map projection) then this value is used. The default is the
golden ratio, (1 + sqrt(5))/2, which was believed to be the most aesthetically pleasing
rectangular shape by the early Greeks. (The front face of the Parthenon in Athens has
this aspect ratio.) The aspect ratio is the ratio of x-size to y-size.

Character scale
This can be used to change the size of text characters in a plot, such as the x and y
axis labels. The default is 1.0.

Background color
The background color to use for line drawings like Contour plots or X vs. Y plots.

Plotting color
The color to use for data points, axes, and text in an X vs. Y plot or other line drawing.

Setting Preferences

RiverTools Users Guide

Chapter 1: Overview of RiverTools

25

Nodata color
The color to use for displaying the pixels in a grid that have values less than the
nodata threshold described previously.

NaN color
The color to use for displaying pixels in an image with floating point values that have
been designated as Not a Number (NaN) using the IEEE standard.

Base for logs


Currently, the choice of e or 10 only applies to Horton plots, which are created via the
Strahler Streams Horton Plots dialog in the Analyze menu. In all other cases,
logarithmic axes on an X vs. Y plot are computed using the base ten logarithm.

RiverTools Users Guide

Setting Preferences

26

Chapter 1: Overview of RiverTools

Setting Colors
Many of the dialogs in the Display menu and elsewhere in RiverTools create color
images. You can change the color schemes that are used by these routines via the Set
Colors dialog in the File menu. You can browse and change the colors used for
Shaded Aspect plots and Density plots on the left-hand side. You can also choose the
background and plotting colors from a droplist; these are used for Contour plots and
many other plotting routines, such as X vs. Y plots. The colors you choose remain in
effect until you change them. When you click on the Save Preferences button in the
File Set Preferences dialog, you also save the current color selections as preferences; the same two droplists appear in the Plotting Options panel of the Set Preferences dialog. There are two sliders labeled Lightness factor that can be used to
lighten the density plot colors or plot colors, respectively.
The Shaded Relief routine in the Display menu must create a new color table, based
on a set of unshaded colors, each time it is called. By default, RiverTools uses a special color table for this set of unshaded colors, but if you click on the Options >> button and then select IDL colors for relief? Yes, it will instead use the colors shown
in the Density plot colors (IDL) window on the left-hand side. IDL color tables
whose names contain the word rainbow often make good shaded relief images.
Note that there is a button near the bottom of the Display Contour Plot dialog
labelled Change Line Colors/Widths >>. If you click on this button, you will get
another dialog that lets you control the attributes of individual contour lines. You can
choose colors from the droplists shown, or you can change the colors of several contour lines at once by choosing Change Several from the Options menu and then
choosing something like Rainbow colors from the drop-down menu.
Note
If your monitor is set to 8-bit color mode and you produce a shaded relief image for
one data set (or one choice of settings), and then produce a second shaded relief
image for another data set (or choice of settings), the first one will be adversely
affected. There is no way around this, since RiverTools attempts to produce the
best-possible shaded relief image for the current settings, and an 8-bit monitor can
only display 256 distinct colors at any one time.

Setting Colors

RiverTools Users Guide

Chapter 1: Overview of RiverTools

27

Setting the Default Color System for Unix Platforms


When running RiverTools on a Unix system, sometimes the colors may appear incorrect of will flash as you move the cursor from one window to another. Often the color
problem is first noticed when a shaded relief image is generated and appears to use a
bad color table.
If your system uses 24-bit color, this problem is usually caused because DirectColor
is used instead of TrueColor. You can force RiverTools (or IDL) to always use TrueColor (thereby eliminating these color problems) by setting up your .Xdefaults file to
contain the following two lines. If you do not have a .Xdefaults file in your home
directory you can create one using a text editor, and enter these two lines into it:
idl.gr_visual: TrueColor
idl.gr_depth: 24

To get these changes to take effect without exiting your Unix session, type this at the
Unix prompt:
xrdb -merge .Xdefaults

If your system does not have 24-bit color, the TrueColor visual class will not be available. In this case, any color problems are probably due to RiverTools using a shared
color map. When an application starts, the window manager allocates colors in the
shared color map for the borders of windows, the foreground and background colors,
and other needed resources. If the number of colors the application requires is available in the shared color map, the window manager will assign the applications
requested colors to entries in the shared color map. But if the application requests
more colors than are available in the shared color map, the window manager will create a private color map for that application. Moving the cursor from that application
to another application will cause the system to switch from the private color map
associated with the first application to the private color map associated with the second application. This type of color flashing is normal for systems with only 8-bit
color.

RiverTools Users Guide

Setting Colors

28

Chapter 1: Overview of RiverTools

Top 10 Things You Should Know About DEMs


RiverTools is able to extract many different kinds of information from the single raster input of a DEM. You might say that the DEM is the star of the show. Because of
this you are less likely to have problems if you take a few minutes to study this crash
course on DEMs.

1. What is a DEM?
DEM stands for Digital Elevation Model. DTM (Digital Terrain Model) is basically a
synonym. Elevation values in a DEM are usually stored as a 2-dimensional array (or
matrix), in which case the data is described as gridded, raster, or regular. Each element or pixel in this array represents the average elevation for some four-sided patch
of terrain or the elevation at a post within the patch. The z-value is all that is stored
in the array, because the x and y-values for any pixel can be computed from its array
indices and a description of the pixel geometry. Notice that an array of 1D elevation
profiles is almost the same thing, and can be embedded in a 2D array. Two important
attributes of any 2D array are its number of rows and columns.
Elevation data is sometimes collected or distributed as XYZ triples, usually with one
triple per line in a text file. In this case the data points may not be regularly spaced
but an interpolation or gridding algorithm can be used to create a raster grid. In RiverTools, this is done by choosing Irregular, ASCII XYZ in the File Import DEM
dialog.

2. Fixed-angle vs. Fixed-length Pixels


Virtually all DEMs are gridded so that the x-size and y-size of each pixel has either a
fixed length or a fixed angular measure. Most DEMs with fixed-length pixels have
been created using the UTM (Universal Transverse Mercator) projection. USGS 7.5minute DEMs provide a common example, where every pixel measures 30 meters on
a side. DEMs with fixed-angle pixels are also common, and are based not on a 2D
map projection but on a 3D ellipsoid model. Geographic (latitude / longitude) coordinates relative to a particular ellipsoid model are used to specify pixel locations and
dimensions. For DEMs with fixed-angle pixels, the x-size and y-size of each pixel, as
measured in meters, varies with latitude and depends on the ellipsoid model that is
used. USGS 1-Degree DEMs provide a common example, where each pixel measures
3 arcseconds on a side and the GRS 80 ellipsoid (North American Datum 1983) or
Clarke 1866 (North American Datum 1927) is typically used. RiverTools needs to
know which of these two pixel geometries a DEM has so that it can accurately com-

Top 10 Things You Should Know About DEMs

RiverTools Users Guide

Chapter 1: Overview of RiverTools

29

pute lengths, areas, and slopes. For fixed-angle DEMs, it also needs to know which
ellipsoid model to use. The ellipsoid model can be indicated via the File Set Preferences dialog.
A bounding box is the smallest rectangle (in a given coordinate system) that completely encloses a given DEM. The corner coordinates of this box are given in decimal degrees latitude and longitude for DEMs with fixed-angle pixels, and in this case
the edges of the bounding box coincide with the edges of the DEM. For DEMs with
fixed-length pixels they are usually given in UTM coordinates (meters), and the
edges of the bounding box will touch but not coincide with the edges of the DEM.
Notice that in this case, the data can still be embedded in a 2D array, but there may be
nodata gaps around the edges.

3. The Data Type of a DEM


The data type of an array determines the range of distinct numbers that can be stored
in the array and the number of bytes that are used to store each number in RAM.
Some common data types and the number of bytes used by each are shown in the
table below. Using the double type all the time would allow you to store just about
any number that you would be likely to encounter, but it would usually be a big waste
of RAM. For example, DEMs are seldom available with a vertical resolution less
than 1 foot or 1 meter, and the highest point on Earth has an elevation less than
32,767 feet (or meters). Since you can store any number between -32,768 and 32,767
as a (signed) 2-byte integer, this is the most efficient and most common data type that
is used for DEMs. However, as DEMs with greater vertical resolution become available, DEMs with the floating point data type (4 bytes) will become more common.
RiverTools accepts DEMs with byte, integer, long, float, and double data types.
Name

RAM Used

Minimum

Maximum

Notes

byte

1 byte

28 - 1

28 = 256

integer

2 bytes

-(215)

215 - 1

215 =32,768

long

4 bytes

-(231)

231 - 1

231 =
2,147,483,648

float

4 bytes

apmin

c * apmax

See Note below.

double

8 bytes

bqmin

d * bqmax

See Note below.

Table 1-1: Properties of standard data types.

RiverTools Users Guide

Top 10 Things You Should Know About DEMs

30

Chapter 1: Overview of RiverTools

Note
For float and double, min and max refer to the absolute value of the floating point
number. Parameters that appear in the table are machine-dependent, but can be
returned with MACHAR function in the IDL language.

4. The File Format of a DEM


As mentioned in item number 1, a DEM can typically be stored as a 2D array or as an
array of 1D elevation profiles. But there are lots of different ways to actually store
this data in a file, and these are known as file formats. Perhaps the most important
attribute of a file format has to do with whether it is meant to be read by humans or
computers. If it is desirable for the file to be human-readable, then the data will be
stored as ASCII (see Glossary), that is, plain text. This has the added advantage of
being very portable, since ASCII has become a standard convention that virtually any
computer can handle. (Although Windows PCs, Macs, and Unix machines all have
their own end-of-line characters which can sometimes cause problems.) However,
even though all computers understand ASCII, they are much more fluent in their own
language, which is binary. This means that binary files can be read and processed
much more quickly than ASCII files. Unfortunately, there are very few humans who
can understand this binary language, in which the entire alphabet consists of the numbers 0 and 1.
Another unfortunate aspect of the binary language is that, unlike ASCII, there is
not just one standard convention, but two. This has to do with the order in which
bytes are stored in multi-byte numbers (both integers and floating point). With the
big-endian byte order, the most significant byte (MSB) is stored first in memory
(e.g. ABCD), while in the little-endian byte order the least significant byte (LSB) is
stored first (e.g. DCBA). (Not to push the analogy too far, but this is a bit like how
adjectives and nouns are interchanged in different human languages.) The standard
terms big-endian and little-endian were borrowed from the book Gullivers Travels,
by Jonathan Swift, in which the Lilliputians are at war over whether to eat their hardboiled eggs from the little end or the big end.
Whether your computer speaks the big-endian or little-endian dialect depends on who
manufactured it. The big-endian, network, or Motorola byte order is used by
Sun, SGI, HP, IBM and Mac computers, for example, while the little-endian, host,
or Intel byte order is used by PCs (Windows or Linux), DEC, and others. This issue
becomes important when binary files that contain multi-byte integers are generated
on one type of computer, and then ported to another type of computer that uses the
opposite byte order convention. To the second computer, the file will look like its in
a foreign language, which can lead to all kinds of strange problems. Converting

Top 10 Things You Should Know About DEMs

RiverTools Users Guide

Chapter 1: Overview of RiverTools

31

between the two conventions is known as byte swapping. If necessary, you can byte
swap an input DEM to make it compatible with your computer by opening the Prepare Convert Grid dialog and choosing swap byte order from the droplist of
functions. See byte order in Appendix B, RiverTools Glossary for more information on this issue.
Note
The byte order of your RiverTools data set is recorded in the RiverTools Information (RTI) file. If you open a data set with RiverTools that has a different byte order
than your computer uses, then RiverTools will automatically byte swap any binary
data that it reads from this data set on-the-fly. This will not alter the files themselves in any way, and RiverTools will display a brief dialog when you open the
File View DEM Info dialog to make you aware of the discrepancy. Also, any
files that you create with this data will be saved with the same byte order as the rest
of the data set.
Besides the distinction between ASCII and binary files, (sometimes called formatted
and unformatted files), there are many other ways in which file formats can differ.
One of these has to do with the order in which the values in the 2D array are written
into the file. If the values are written to the file row by row, starting with the first row,
then the format is called row major, while if they are written column by column it
is called column major. RiverTools grids are binary, row major files, where the first
row is assumed to correspond to the north edge of your DEM and values in a row are
ordered from west to east. This is a common and efficient distribution format for
DEMs, with georeferencing information given in one or more small ASCII files. If
you encounter a flat binary DEM that uses another convention like column major,
you may have to apply some operation like flipping the y-axis, rotating, or transposing your input DEM grid in order to get it into this format. These options are all available from the droplist of functions in the Prepare Convert Grid dialog.
Since different file formats offer various advantages and disadvantages, and since
DEMs are available from many different sources, there are several standard formats
in widespread use. The File Import DEM tool can read and convert many of the
most common file formats, and new ones will be supported in future versions of RiverTools. Some common raster formats include: SDTS Raster Profile (now used by the
USGS), USGS Standard, GeoTIFF, DTED, netCDF, gridded ASCII and flat binary.
However, there is a dramatic difference in the disk space required by different file
formats, and this gets to be an important issue when working with large data sets. For

RiverTools Users Guide

Top 10 Things You Should Know About DEMs

32

Chapter 1: Overview of RiverTools

example, the following tabe shows the disk space (in bytes) required to store a typical
1-degree USGS DEM which has 1201 rows and 1201 columns for several common formats.
File format

File size (bytes)

Formatted ASCII

11,700,142

USGS format (ASCII)

9,839,616

XDR binary format

5,769,604

2-byte binary

2,884,802

Table 1-2: Disk space used by different file formats for same DEM.
It is clear that the 2-byte binary format requires much less space than the other formats. However, it can also be read into RAM much faster, because it does not have to
first be converted to binary, as is necessary for the other formats. About the only disadvantage of the 2-byte binary format is that these files are not automatically portable
between different computers.
Using the File Import DEM dialog, you can easily import DEMs from any of
several standard file formats into the efficient binary format that is used for RiverTools grid files. This dialog accepts one matching wildcard (an asterisk) in the
input and output filenames, which makes it possible to import several DEMs sequentially as a batch job. If necessary, you can also apply operations like rotation, byte
swapping, resizing, previewing, and unit conversion to your DEM with the Prepare
Convert Grid dialog.
Finally, keep in mind that the elevation values stored in a DEM carry measurement
units like meters or feet. RiverTools assumes that values are given in meters, but
offers unit conversion among the functions in the Prepare Convert Grid dialog.
If you have also purchased IDL, you can also use the RT_Convert_DEM_Units procedure. If your DEM is stored as 2-byte integers and you convert from feet to meters
you will lose some vertical resolution unless you also convert to a floating point data
type.

6. Most DEMs Have Pits and Flats


When a continuous land surface is discretized to create a DEM, some information is
always lost, since features smaller than a pixel can no longer be resolved. The effect
of discretization is very similar to that of a low-pass filter. It is important to realize
that it is mathematically impossible to uniquely recover the original surface from a

Top 10 Things You Should Know About DEMs

RiverTools Users Guide

Chapter 1: Overview of RiverTools

33

discretized version. Because of this, there will typically be places where the width of
a river valley is narrower than the pixel size. Since a pixels elevation often represents
an average over the region spanned by the pixel, the river valley at such a location
will appear to be dammed in the DEM. These artificial dams are called digital dams,
and the depressions that are created upstream of them are called pits. Sometimes a
distinction is made between single-pixel pits and multi-pixels pits, since the former
can also be caused by noise of the salt-and-pepper variety. One or more pixels at the
lowest elevation in the pit are collectively called a (local) minimum in the DEM.
While pits result from horizontal discretization of the land surface, flats result
from the vertical discretization. That is, there is also a loss of vertical resolution of
the surface that depends on measurement accuracy. This means that one or more of a
pixels eight neighbors may have the same elevation value (in the DEM) as the pixel
itself, even though they may actually have slightly lower elevations.
For both pits and flats, flow direction is ambiguous because none of the pixels eight
neighbor pixels has a lower elevation than it does. However, notice that pits can be
converted to flats by filling them, and the flow direction for a flat is at least constrained to be in the direction of one of the neighbors that have the same elevation.
Since flats are common, RiverTools provides three state-of-the-art algorithms for
assigning self-consistent flow directions within flats. These include an iterative linking algorithm, the algorithm of Garbrecht and Martz (1997) for imposing artifical
gradients within the flat, and an improved version of the imposed gradient algorithm. The flow directions are stored as codes in a flow grid. You should be aware,
however, that complete accuracy is not possible in this situation without higher-resolution DEM data.

7. Spikes in Area-Altitude Plots


If you create an area-altitude plot for a typical DEM which you can do with the
Analyze Entire Grid Area-Altitude Plot dialog you will often see regularly-spaced spikes in the plot. These result from the fact that many of the currently
available DEMs (such as the USGS 1-Degree DEMs) have been made from digitized
contour maps. The interval between spikes is the same as the interval between the
contours in the map that was used to make the DEM. The spikes occur because the
digitizing process always causes contour elevations to be over-represented in the
DEM. That is, it causes these particular elevations to have an unnaturally high frequency of occurrence. While it would certainly be preferable if DEMs didnt have
these spikes, they dont cause as many problems as you might expect. For example,
they dont have much of an effect on planimetric spatial relationships. Also, mea-

RiverTools Users Guide

Top 10 Things You Should Know About DEMs

34

Chapter 1: Overview of RiverTools

sured channel slopes may still be reasonably accurate for channels that span several
contour intervals. This is a problem, however, and one that is beginning to be
addressed as new DEMs are made available.

8. Errors in DEMs
Notice from Number 6 that pits and flats arent really errors. It is probably better to
think of them as unavoidable consequences of the discretization process. It seems
fair, however, to describe spikes as a type of error that results from how the DEM is
made, since making the DEM in some other way could potentially eliminate this type
of error. However, some DEMs have other types of systematic or nonsystematic
errors that go beyond pits, flats, and spikes. For example, the original USGS 7.5minute DEMs (with 30 meter pixels) often have line-striping or patchwork-quilt
types of errors that are usually artifacts of the automated methods that were used to
create these DEMs. Errors are also common along the edges of some types of DEMs,
so that DEMs for adjacent regions do not always patch together smoothly. These
types of errors are more serious and make it difficult to extract accurate flow line patterns from the DEM. Many of these problems have been corrected in the latest 7.5Minute DEMs from the USGS, in SDTS Raster Profile format.

9. What is a raw DEM?


In RiverTools, the phrase raw DEM refers to a DEM that has been converted to the
RiverTools grid format, but that still contains the original, unaltered elevation values.
The standard RiverTools file extension used for raw DEM grid files is
_rawDEM.rtg. However, in order to deal with some of the problems discussed
above, RiverTools will typically work with a copy of this DEM that has been altered
in some way. For example, RiverTools always creates a copy of the raw DEM in
which it fills depressions, since this is a necessary step in the process of creating a
flow grid. Another example would be a copy in which an effort has been made to correct some type of error in the original. It is a good idea to keep the raw DEM around,
either for the purpose of comparison, or as a starting point for later processing with
different options or methods. They can be big, however, so you may want to store
them in a different place or even compress them. You can compress files with the
Prepare Gzip File dialog.

10. Describing Your DEM to RiverTools


Having taken the time to read this list, you now know quite a few things about DEMs
that you should find useful. In particular, you should now know what is meant by
phrases like fixed-angle pixels, fixed-length pixels, data type, format (or file format),
byte order, row major, and bounding box. Or at least you know that these are impor-

Top 10 Things You Should Know About DEMs

RiverTools Users Guide

Chapter 1: Overview of RiverTools

35

tant attributes of DEMs that are worth knowing about. If you need a quick reference
for what these terms mean later on, you can always consult Appendix B, the RiverTools Glossary.
Knowing these things about DEMs will also make it easier to understand the descriptive information in RTI files and to troubleshoot problems that you may have with a
new DEM. Most of the information in an RTI file can be viewed, checked and edited
with the File View DEM Info dialog. You can also view (but not edit) a complete
RTI file with the File View Text File RTI File dialog. An RTI file is created
automatically when you (1) import a DEM, (2) create a new DEM using the Prepare
Patch RTG DEMs mosaicking tool, or (3) create a new DEM using the Prepare
Convert Grid dialog.

RiverTools Users Guide

Top 10 Things You Should Know About DEMs

36

Chapter 1: Overview of RiverTools

Mosaicking and Subsetting DEMs


It is rare for a basin of interest to be nicely inscribed in an existing DEM, such as a
USGS 7.5-Minute DEM. More often, a single basin will intersect several DEMs,
each of which is stored in a separate file. In other words, bits of the basin of interest
are typically scattered among many different files. For this reason, creating a single
DEM for a study basin requires reading portions of several different DEM files and
patching them together to form a single DEM. This DEM must completely contain
the drainage divide which defines the basin boundaries if it doesnt, the depression-filling algorithm used by RiverTools may not work properly. On the other hand,
it should not be any larger than necessary because this is a waste of disk space and
memory and will slow down the routines that are used to process the DEM. Ideally
then, the DEM should consist of the smallest rectangular region that completely contains the basin.
The Patch RTG DEMs dialog in the Prepare menu makes it easy to mosaic or
patch together two or more DEMs to create a new, larger DEM. It can also be used
with a single DEM to create a new DEM for a user-specified rectangular subregion.
In both cases, you specify the input DEM(s) with a simple Add/Remove dialog and
then select the region of interest with a rubber band box. An RTI file with proper
georeferencing information is created automatically. The remainder of this section
gives a step-by-step explanation of the procedure and each of the various options.
Once you are familiar with the dialog it takes very little time to create a mosaic or
subset DEM.

Step 1.
Determine all of the component DEMs which contain some part of your study basin.
This can often be done with a graphical tool on a web site that distributes DEMs.
Hydrologic maps are also useful for this purpose. For USGS 1-Degree DEMs you can
use a USGS hydrologic unit map for the U.S. entitled Surface-Water and RelatedLand Resource Development in the United States and Puerto Rico, since this map
displays both drainage network lines and a grid of lat/lon lines with a 1-degree spacing. (Information on other hydrologic unit maps is available from USGS web sites.)
Obtain the component DEMs that span your study basin, either by downloading them
from the Internet, or by purchasing them on a CD-ROM or other media. Copy these
onto your computers hard disk. Chapter 3, Elevation Data Sets and Formats,
describes many of the DEM data sets that are currently available.

Mosaicking and Subsetting DEMs

RiverTools Users Guide

Chapter 1: Overview of RiverTools

37

Note: USGS 1-Degree DEMs are defined by the latitude and longitude of their southeast corner. Of the 1-degree DEMs which contain the basin, the southernmost, northernmost, easternmost, and westernmost determine the smallest rectangular array of
DEMs which completely contain the basin.

Step 2.
Import each of the component DEMs into RiverTools using the Import DEM dialog
in the File menu. This procedure is explained in an earlier section of this chapter
called Importing a DEM. As a result of this step you will have a flat binary version of
each component DEM and a RiverTools Information (RTI) file for each DEM. If
some of the component DEMs use different elevation units (e.g. feet vs. meters), then
you must use the Prepare Convert Grid dialog to convert to a common set of
units and a common data type.

Step 3.
Select Patch RTG DEMs from the Prepare menu to open the dialog for the mosaicking tool.

Step 4.
Add DEMs to the list shown by clicking on the Add button and then selecting them
with your computers native file selection dialog. If you are creating a mosaic from a
large number of component DEMs, you can add an entire list of DEMs in one step by
selecting Use Saved List from the Options menu in the upper left corner of the dialog. The saved list must consist of a text file (ASCII) that contains one filename (with
the full path) per line. As DEMs are added to the list, RiverTools will verify the existence of a corresponding RTI file and will also check to make sure that the DEMs in
the list are compatible for mosaicking. RiverTools cannot yet mosaic DEMs from different UTM zones (which are six degrees wide), since this requires reprojection and
distortion of the data.

Step 5.
You can remove a DEM from the list by selecting it and then clicking on the Remove
button.

Step 6.
You can preview a shaded relief image for a DEM in the list by selecting it and then
clicking on the Preview button along the right-hand side of the dialog.

RiverTools Users Guide

Mosaicking and Subsetting DEMs

38

Chapter 1: Overview of RiverTools

Step 7.
It is always a good idea to double-check the information in the RTI files, which may
or may not have been created by RiverTools. This can be done by selecting a DEM in
the list and then clicking on the View Infofile button on the right-hand side of the dialog. This opens the View DEM Info dialog, which has a Check Info button at the
bottom. (This dialog is explained in detail in the next chapter.) If you click on this
button, RiverTools will check the basic validity and consistency of the information in
the RTI file. Proper mosaicking relies on accurate georeferencing information for
each component DEM, which is stored in its RTI file. Click on the Close button to
dismiss the View DEM Info dialog when finished.

Step 8.
When you are finished adding DEMs to the list, specify a data set prefix to be used
for the new DEM and RTI file that will be created.

Step 9.
Click on the Start button in the lower left corner to open the DEM Patching Preview Window. This window shows how the DEMs in your list fit together. By
default, a shaded relief image will be used, but you can use a density plot image
instead by choosing Change Backdrop to Density from the Options menu in the
upper left corner. Regions not spanned by the DEMs in your list are shown in white.

Step 10.
It is often helpful to label each of the component DEMs with its filename in order to
see their relative positions. This can be done by choosing Label DEMs from the
Options menu at the top of the DEM Patching Preview Window. (The labels do not
interfere with the mosaicking process.) You can save this labeled image for future reference by choosing Options Save Window. You can make a visual record of the
region you selected by choosing Options Burn in Lines prior to saving the window.

Step 11.
Click the left mouse button and drag in the DEM Patching Preview Window to
select a rectangular subregion. The initial default is to create a mosaic for the entire
region shown in the window. You can reselect the entire region at any time by clicking the right mouse button. If your selected rectangle intersects a region which is not

Mosaicking and Subsetting DEMs

RiverTools Users Guide

Chapter 1: Overview of RiverTools

39

spanned by the component DEMs, that region will be assigned the current nodata
value in the DEM that you create. The current nodata value can be changed via the
Set Preferences dialog in the File menu.
Find your basin of interest in the DEM Patching Preview window. Try to visually
determine where the basin boundary is, or use maps if necessary. Try to make sure
that the entire basin is contained within the rubber band box. Note that descriptive
information for the region you have selected is printed in the RiverTools output log.
If you are having difficulty identifying the extent of your study basin, it is often helpful to use a different backdrop (shaded relief or density plot) via Options Change
Backdrop. It can also be helpful to change the color scheme via the File Set Colors dialog. You will need to press the Start button again to create a DEM Patching
Preview window that uses the new backdrop or colors.
If you find out later on that the DEM you created did not fully contain the basin
boundary of your study basin, you can always use this dialog again.
Note
For your convenience, RiverTools enlarges your chosen region slightly (if necessary) so that the number of rows and columns in your DEM are each divisible by
12. Since 12 is divisible by 2, 3, 4, and 6, this provides for several whole-number
rescalings. The padding will be at most 11 rows and 11 columns.

Step 12.
When you have selected a region of interest with the rubber band box, click on the
Save New DEM button at the bottom of the DEM Patching Preview Window or
choose Options Save New DEM. RiverTools will begin creating a mosaic for the
selected region using the component DEMs. How long this takes will depend on the
dimensions of the selected region and the speed of your computer.
When finished, you will see a message dialog with the names of the three files that
were created: a DEM, a raw DEM copy, and an RTI file. The newly created DEM
will be automatically selected as the current DEM data set, so you can immediately
create images for it with the first four dialogs in the Display menu. However, most
other routines cannot be applied until after you have run the first four network extraction routines which are located in the Extract menu.

RiverTools Users Guide

Mosaicking and Subsetting DEMs

40

Chapter 1: Overview of RiverTools

Extracting Drainage Networks from DEMs


The procedure for extracting a drainage network from a DEM with RiverTools is
highly automated and only requires user input at a few key points. You simply run the
first four routines in the Extract menu, in top-down order. This section gives a brief
overview of the tasks performed by each routine, followed by subsections that discuss some of the issues involved. For complete instructions on how to use these four
dialogs, see Chapter 2, How to Use the RiverTools Dialogs. Most of the dialogs
accessed via the Extract menu have a Help button at the bottom that provides context-sensitive help. If you are unfamiliar with any of the terms used in these dialogs,
please consult Appendix B, the RiverTools Glossary, or by accessing the RiverTools
Help system from the Help menu.
Some of the routines in the Extract menu have a lot of work to do and may take a
while to run for a large DEM. During this time your computer may be unresponsive.
In order to get a sense of how long various operations take on a given computer, it is
a good idea to begin with a small DEM, such as the KY_Sub DEM (408 columns by
468 rows) provided in the sample Basins directory, and to work up to larger DEMs. If
you are using a PC or a Mac (as opposed to a multi-user operating system like Unix)
you may want to process very large DEMs at night or during times when you arent
actively using your computer.
The Extract Flow Grid routine only needs to be run once for a given DEM. If you
wish to experiment with the different algorithms in Step 1 for resolving flow in flats,
it is best to copy the raw DEM and RTI file into a new folder prior to each experiment
and change the compound extension of the raw DEM to _DEM.rtg. The other three
routines can be repeated for any number of basins that you wish to analyze (in a given
DEM) and for any number of different pruning options that you wish to try. Each
time you repeat these three routines you supply a different basin prefix in the dialog. A basin prefix is used to identify and group the set of extracted files that pertain
to a particular basin or set of processing options. Many of the routines in the Display
and Analyze menus apply to the currently selected basin which can be changed with
the File Change Basin Prefix dialog.

Step 1. Extract Flow Grid (D8)


This routine performs two major tasks:
(1) Create a depressionless DEM from your original DEM. These files have the file
extensions _DEM.rtg and _rawDEM.rtg.

Extracting Drainage Networks from DEMs

RiverTools Users Guide

Chapter 1: Overview of RiverTools

41

(2) Create a RiverTools D8 flow grid file using this new depressionless DEM. This
file will have the filename extension _flow.rtg.
There are three different options for resolving flow direction in flats. Iterative linking is a robust algorithm, but it can produce parallel flow lines within broad flat valleys. Imposed gradients is the method proposed by Garbrecht and Martz (1997)
which attempts to center flow within flat valleys and reduces parallel flow. Imposed
gradients plus is a new method which further refines flow within flats to eliminate
virtually all parallel flow. The latter two methods are slower but yield better results
when flats are an issue.
You can also import a flow grid from another source via the Prepare Convert
Flow Grid dialog. In this case you can import the flow grid and then proceed to Step
2.

Step 2. Extract Basin Outlet


This is a graphical routine that makes it easy to specify the watershed you want to
analyze by selecting and saving its basin outlet. This step can be skipped if you plan
to select All basins draining to edge, Read outlets from user file or All basins
draining to RTM mask in Step 3.

Step 3. Extract RT Treefile


This routine creates a RiverTools treefile from a RiverTools flow grid. The treefile is
a vector-formatted file with the extension _tree.rtv, while the D8 flow grid is a
raster-formatted file with the extension _flow.rtg. You can create a treefile using:
(1) a single outlet pixel that you selected and saved via the Extract Basin Outlet
dialog, or (2) all pixels that have a flow code of zero as basin outlets, which includes
the four edges of the DEM and the nodata pixels in the DEM, or (3) a set of pixels
whose coordinates are listed as two columns in a text file, or (4) a set of pixels with
locations saved in an RTM (RiverTools Mask) file. In the last case, only the pixels on
the boundary of the masked region are used. If you wanted to extract the set of rivers
that drain to a lake, you could create an RTM file for the lake with the Extract
Mask Connected-to-Seed Mask dialog and then choose option 4. To extract the
set of rivers that drain to an ocean coastline, you could similarly create an RTM file
for the land pixels with the Extract Mask Land Mask dialog and then choose
option 4.

RiverTools Users Guide

Extracting Drainage Networks from DEMs

42

Chapter 1: Overview of RiverTools

A treefile stores basic attributes and network topology for each pixel in a watershed
or set of disjoint watersheds. Treefiles can be pruned in different ways and with different thresholds to identify channel sources and create river network maps. They are
also used to rapidly compute the attributes and coordinates of each link and Strahler
stream in a river network.

Step 4. Extract River Network


This routine uses a RiverTools treefile and a user-specified pruning method and
threshold to automatically compute and archive a large number of derived quantities
like drainage area and slope for every channel link and Strahler stream in a river network. This information is stored in vector-formatted files that end in _link.rtv and
_stream.rtv. The archived information can then be rapidly displayed and analyzed
using tools in the Display and Analyze menus.
RiverTools currently provides four different pruning methods for identifying channel sources so that the treefile can be pruned to accurately depict the heads of channels. The design of RiverTools makes it easy to experiment with different approaches
to this problem (by repeating steps 3 and 4 with different settings) and to determine
the best solution for a particular watershed. You can use any RTG (RiverTools Grid)
file for pruning by selecting Specified grid file from the Prune by droplist and then
entering the name of the RTG file. For example, you could create an RTG file that
depends on some function of slope, area and/or curvature with the Extract
Derived Grid Grid Calculator dialog and enter its name here.

Divergent vs. Convergent Flow


On a hillslope flowlines may first diverge (spread out) before converging into channels at the bottom of the hill. RiverTools provides routines for analyzing both convergent and divergent flow. For convergent flow and the identification of individual
channels, channel networks and basin boundaries, the well-known D8 algorithm is
used. This algorithm tracks flow from each pixel to one of its eight neighbor pixels.
The RiverTools implementation of the D8 algorithm is efficient and powerful, and
can assign reasonable flow directions even in very complex and ambiguous situations
without user intervention. However, the D8 algorithm is based on two simplifying
assumptions that do not capture the geometry of divergent flow over hillslopes. These
simplifications are: (1) the use of eight discrete flow angles, and (2) all flow leaving
any given pixel (or the area contributing flow to the pixel) is assumed to flow into a
single downstream neighbor pixel. While these simplifications are valid in regions
where the flow is convergent, it is possible to do better on hillslopes where the flow is
divergent by using an algorithm that allows (1) continuous flow angles, and (2) flow
partitioning to two or more neighbor pixels.

Extracting Drainage Networks from DEMs

RiverTools Users Guide

Chapter 1: Overview of RiverTools

43

The D-Infinity algorithms proposed by Tarboton (1997) provide a fairly robust and
pragmatic solution to this problem, but they do not solve it in a rigorous manner. That
is, the rule for partioning mass between two neighbor pixels is somewhat arbitrary
and not based on mass balance. These algorithms strike a compromise between the
limitations of D8 flow and other problems that occur when flow to more than two
neighbor pixels is permitted. They are available within RiverTools via the Extract
D-Infinity Grid menu, and can be used to create a continuous angle flow grid, a
slope grid, and a contributing area grid.
In RiverTools 3.0, a new method for partioning flow between neighbor pixels has
been introduced, called simply the Mass Flux Method. This method treats each pixel
as a control volume and uses a rigorous mass balance that (1) divides each pixel into
four quarter-pixels, (2) computes a continuous flow angle for each, and then (3) computes contributing area and specific area using the actual fraction of flow that would
pass through each of a pixels four edges under a uniform rainrate. (The accuracy of
this contributing area does not depend on whether rainrate is actually uniform or not,
it is just a conceptual construct.) As with the D-Infinity method, flow from a given
pixel will typically be partioned between two neighbor pixels, except in the case of
pixels that are single-pixel peaks or that lie on drainage divides. Note that we are
speaking in terms of flows and mass balance even though our objective is to compute
contributing areas on divergent surfaces as accurately as possible. The new Mass
Flux algorithms are available via the Extract Mass Flux Grid menu. Grids based
on quarter-pixels are created and saved (with QP for quarter-pixel in their name,
along with their own RTI files), but they are also averaged to create flow angle and
area grids that have the same dimensions as the DEM. Continuous angle grids from
the D-Infinity and Mass Flux methods look quite similar, but there can be significant
differences between the area grids computed by the two methods. Both the D-Infinity
and Mass Flux algorithms use a D8 flow grid to resolve ambiguous flow situations in
flats and pits.
You can experiment with these different algorithms by using DEMs in the
Test_Surfaces folder on the RiverTools Data CD. While they can give significantly
different results on a divergent surface, they all give similar values for the contributing areas of larger, channelized watersheds.
If you want to learn more about the algorithms that are used for extracting drainage
networks and other information from DEMs, there are many good papers on the subject. A list of references can be found in Recommended Reading on page 64. You
should be aware that there are several different approaches to any given problem, and
several different ways to try to resolve ambiguous situations and other problems that
arise. This area of research is evolving rapidly and promising new approaches and
algorithms will continue to be included as options in future versions of RiverTools.

RiverTools Users Guide

Extracting Drainage Networks from DEMs

44

Chapter 1: Overview of RiverTools

Processing Large DEMs


One of the things that sets the network extraction tools in RiverTools apart from others is that the ones in RiverTools have been specifically designed to be able to extract
river networks (and all of the important attributes of these networks) from extremely
large DEMs. Because of the unique way that it processes these large DEMs in pieces,
and due to the efficiency of the algorithms it uses, RiverTools should be able to
extract the drainage network from a DEM as large as 2.14 billion pixels in size. (Note
that this would be the number of pixels in a DEM that has 46,340 rows and 46,340
columns, and it would require a very large amount of file storage space.) This constraint results from 2.1 billion being the maximum value of a signed 4-byte (long)
integer, and the fact that most current operating systems have a 32-bit (or 4-byte)
architecture. The maximum possible amount of RAM and the maximum possible file
size on a 32-bit operating systems is therefore 2.1 gigabytes. Of course, processing
large data sets takes time, even with efficient algorithms. In preparation for letting
you explore your data set in real time, the network extraction routines in RiverTools
create a number of auxiliary files in which derived data and other information is
stored until you need it. To keep storage requirements as low as possible, only information that is frequently used or takes a long time to compute is stored in these files.
The goal is a balance between efficient use of file space and efficient use of your
time.
You may encounter the maximum filesize limit of 2.1 GB when trying to create a
treefile with the Extract RT Treefile dialog. Treefiles are often 10 to 15 times
larger than the DEM from which they are derived.
Note
Many of the routines in RiverTools can be applied to any DEM, even if it doesnt
contain a drainage basin, or you arent interested in the drainage network.

Extracting Drainage Networks from DEMs

RiverTools Users Guide

Chapter 1: Overview of RiverTools

45

Extracting Other Information from DEMs


Besides extracting flow grids and river networks, RiverTools can extract many other
types of derived data from a DEM, including grids, masks and functions. Once you
have used the Extract Flow Grid routine to extract a D8 flow grid for your DEM,
you can then use extraction routines in the Extract D8-based Grid menu or
Extract Mass Flux Grid menu. Typically, any dependencies on previously
extracted grids are reflected by their order of appearance in the menu, so you should
work from the top down in these menus. The dialogs in this menu let you create grids
with the same dimensions as the DEM for a number of different quantities including:
Upstream Areas, Flow Widths, Specific Areas, Downstream Slopes, Downstream
Curvatures, Flow Distance, Area Increments, Number of Kids, Horton-Strahler
Order, Watershed Subunits, Upstream Relief, Longest Channel Length and Basin
Averages.
The Extract Finite Difference Grid menu contains routines for computing derivatives, various types of curvature and other quantities by via a finite-difference
method that fits a quadratic surface to each pixel and its 8 neighbors. This method is
described in a paper by Zevenbergen and Thorne (1987).
The Extract Derived Grid menu contains grid-creation routines that do not necessarily require a D8 flow grid. The choices are: Grid Calculator, Topographic Index,
and Restricted to RTM. The Grid Calculator is a powerful tool that lets you create
new grids using mathematical functions of up to three input grids. The Topographic
Index requires area and slope grids created with routines in the Extract D8-based
Grid menu, Extract D-Infinity Grid menu, or Extract Mass Flux Grid
menu.
The Extract Mask menu contains routines for creating RTM files (RiverTools
Mask) for various features of interest. These tools let you create a: Subbasin Mask,
Flat Mask, Peak Mask, Ridge Mask, Pit Mask, Grid Threshold Mask, Connected-toSeed mask, Land Mask and Ocean Mask.
The Extract Function menu currently contains routines for creating a Width
Function (from a linkfile) that gives the number of channel links at any given flow
distance from the basin outlet and an Area-Distance Function (from a treefile) which
gives the area spanned by the pixels at a given flow distance from the basin outlet.
For complete instructions on how to use any of the dialogs in the Extract menu, see
Chapter 2, How to Use the RiverTools Dialogs. This information can also be
accessed from within RiverTools by choosing Dialogs from the Help menu. Note that
abbreviated help for any of the routines in the Extract menu can be viewed by press-

RiverTools Users Guide

Extracting Other Information from DEMs

46

Chapter 1: Overview of RiverTools

ing the Help button at the bottom of the dialog. If you are unfamiliar with any of the
terms used in these dialogs, or simply need a precise definition, please consult the
Glossary in the Help menu or at the end of the Users Guide.

Extracting Other Information from DEMs

RiverTools Users Guide

Chapter 1: Overview of RiverTools

47

Interacting with an Image


The Display menu contains a variety of different dialogs that you can use to create
color images. The Display Menu section of Chapter 2 gives instructions on how to
use each of these dialogs, along with tips and suggestions. Many of the graphics windows that are created by these dialogs have a menu bar across the top, with menus
called: Options, Tools, and Info. The Tools menu contains a variety of tools that you
can use to interact with that window. This section explains how to use each of these
interactive window tools. You can change several of the default settings used by these
tools by opening the Set Preferences dialog in the File menu, and choosing Window
Tools from the Preference type droplist.
To begin using a tool, select it from the Tools menu and then click in the window with
the left mouse button. For some tools, like Line Profile, you will need to hold down
the left mouse button, drag, and then release the left mouse button. You can quit using
any tool by clicking the right mouse button or by selecting a different tool from the
menu.
Note
The Tools menu cannot be used (and will not appear at the top of the window)
unless the map projection is set to the default, which is None (one-to-one). The
map projection can be changed via the Display Map Projection Info dialog.

Line Profile
Click and drag in the window to draw a line in the window. A second window pops
up which shows the elevations in the DEM along the transect that corresponds to this
line. You can look at the cross-section of a hill or valley by carefully clicking on
opposite sides of the feature. The second window has an Options menu which lets
you save the profile to a file, fill under the curve, print the profile or save the profile
as an image.

Channel Profile
Click in the window to select a pixel. The downhill path that water would take as it
flows from this pixel to the edge of the DEM is overlaid on the image, and a second
window pops up showing the elevations in the DEM along this streamline. This
kind of plot is also known as a longitudinal profile plot. The black curve shows the
elevations in the DEM that has filled depressions (with extension _DEM.rtg). To
overlay a red curve that shows the elevations in the original raw DEM (with exten-

RiverTools Users Guide

Interacting with an Image

48

Chapter 1: Overview of RiverTools

sion _rawDEM.rtg ), select Options Show Raw DEM Profile Yes from the
menu at the top of the Channel Profile window. The jagged appearance of this curve
reflects the fact that numerous pits were filled to create a depressionless DEM. Longitudinal profiles are almost always concave up, and there have been many efforts to
explain this feature and to predict the functional form of the profile from first principles. Power laws and the negative of the log function often provide good fits to these
profiles. You can fit various curves to the channel profile by choosing from the
Options Fit Curve to Profile menu. Best-fit parameters are printed in the output
log window. Note that longitudinal profiles created from DEMs often have a (usually
artificial) stair-step appearance that is a by-product of how DEMs are usually made.
See the section called Top 10 Things You Should Know About DEMs for more information.
The Options menu of the Channel Profile window has several other options which
let you save the profile to a file, fill under the curve, print the profile or save the profile as an image. There is also an option to select a different grid so that you can
examine how a variable other than elevation (e.g. contributing area) varies along a
streamline.

Reach Info
Click in the window to select a pixel. The streamline or downhill path that water
would take as it flows from this pixel to the edge of the DEM is overlaid on the image
and a separate dialog appears which lets you query an arbitrary segment of the
streamline (a reach) by selecting downstream and upstream nodes with sliders. Information for the selected reach, including its elevation drop, length, slope and side contributing area are reported in the dialog.

Magnify
Click in the window to select a pixel. A square subarray centered on the pixel you
selected is read from the window and then magnified by a factor of five. (You can
change the magnification factor in the preferences.) Note that you can also hold down
the left mouse button and drag across the window. Compare this tool to the Density
Zoom tool.

Vector Zoom
Click in the window to select a pixel. A square subarray in the vicinity of the pixel is
read from your DEM and used to create a vector zoom plot in a separate window.
Contour lines for the selected region are drawn in purple and the edges of individual
pixels are drawn in gray. A yellow line segment is drawn from the center of each
pixel to the neighboring pixel that it drains toward. A red box is drawn around the
Interacting with an Image

RiverTools Users Guide

Chapter 1: Overview of RiverTools

49

center pixel, and the elevation of the center pixel is displayed at the bottom of the
Vector Zoom window. Notice that there are also buttons along the bottom of this
window that let you move one pixel at a time. This is useful for working with large
DEMs, since it lets you select individual elements in the DEM even though a large
DEM must be displayed at reduced resolution on your computer screen. If you click
in the Vector Zoom window, you can navigate with the arrow keys on your keyboard. Note that you can also hold down the left mouse button and drag across the
window. Numerous options are available in the Options menu of the Vector Zoom
window. The Vector Zoom, Value Zoom and Surface Zoom windows are automatically linked (and update together) when they are open at the same time.

Figure 1-1: The Vector Zoom Window Tool.

RiverTools Users Guide

Interacting with an Image

50

Chapter 1: Overview of RiverTools

Value Zoom
Click in the window to select a pixel. A small square subarray in the vicinity of the
pixel is read from your DEM, and the elevation values in this subarray are displayed
in a table. The coordinates of the center pixel are also shown. You can change to other
types types of coordinates by choosing from the Options Change Coords menu.
Additional options in this menu let you select a different grid, configure the dialog,
and enable pixel-based grid editing. You can jump to a particular pixel in the DEM
image by entering X and Y values in the text boxes and pressing Return on your keyboard.

Surface Zoom
Click in the window to select a pixel. A square subarry in the vicinity of the pixel is
read from your DEM and used to create a 3D perspective, wire-mesh surface plot.
The mesh is colored using the Density plot color table that is currently selected in
the File Set Colors dialog. Color tables with the word rainbow in their name
often produce striking images that sometimes exhibit a strong 3D effect.
Numerous options are provided at the bottom of the window and in the Options
menu. Options at the bottom of the window let you change the viewing angle, the size
of the square subarray, the apparent distance to the surface, and other attributes.
Entries in the Options menu let you change the style of the surface from wire mesh to
lego or shaded, select a different grid to use for coloring the mesh, change the color
table, change the background color, print the image or save the image to a file. See
the notes for the Vector Zoom tool.

Density Zoom
Click in the window to select a pixel. A square subarray in the vicinity of the pixel
you selected is read from the DEM and then displayed as a full-resolution, contrastenhanced density plot. The colors in the image come from the Density plot color
table that is currently selected in the File Set Colors dialog. Note that you can
also hold down the left mouse button and drag across the window. Compare this tool
to the Magnify tool.
You can zoom in and out by clicking the zoom bitmap buttons or by entering a zoom
factor into the text box. The Options menu lets you select which grid to display,
change the color table, print the image or save the image to a file.

Interacting with an Image

RiverTools Users Guide

Chapter 1: Overview of RiverTools

51

Relief Zoom
Click in the window to select a pixel. A square subarray in the vicinity of the pixel
you selected is read from the DEM and then displayed as a full-resolution shaded
relief image.

Add Scale Bar


Click the left mouse button in the window to overlay a scale bar on the image. You
can click the right mouse button or use the Options Burn in Lines in the window
to burn in this scale bar. Otherwise it is erased when you select another window
tool.

Add Color Bar


Click the left mouse button in the window to overlay a color bar on the image. You
can click the right mouse button or use the Options Burn in Lines in the window
to burn in this color bar. Otherwise it is erased when you select another window
tool.

Add Marker
Click the left mouse button in the window to place a small crosshairs marker on the
image. You can click the right mouse button or use the Options Burn in Lines in
the window to burn in this marker. Otherwise it is erased when you select another
window tool.

Mouse Help
Select Mouse Help to view a dialog that explains what each mouse button does in the
current context. Mac users may have only one mouse button, and in this case the dialog explains how to emulate other buttons by pressing the mouse button and a key on
the keyboard at the same time.

Flood Image
This dialog lets you set both a current and a target water elevation with sliders. All
pixels in the corresponding DEM that have an elevation less than the current value
will be colored blue. If the target value is greater than the current value, then when
you press Start you will see an animation of the water being raised from the current
value to the target value. If the target value is less than the current value, then you
will see an animation of the water being lowered from the current value to the target

RiverTools Users Guide

Interacting with an Image

52

Chapter 1: Overview of RiverTools

value. You can enter different values in the Number of steps text box to slow down
or speed up the animation. This is meant only as a visualization tool and is not meant
to simulate what would happen in an actual flood.

XobjView
Click in the window to select a pixel. A square subarry in the vicinity of the pixel is
read from your DEM and passed to an IDL procedure by the same name that uses IDL
object graphics to view and manipulate a wire mesh surface plot. This tool is initially
set to its rotation mode and creates a window which initially shows a top view of
the wire mesh. Click and drag in this window to change the viewing angle.

Interacting with an Image

RiverTools Users Guide

Chapter 1: Overview of RiverTools

53

Saving Graphics as PostScript


You can save just about any graphic that you create with RiverTools as a PostScript
file. RiverTools supports Standard PostScript (with adjustable width and margins),
Encapsulated PostScript (for insertion into document-preparation programs like TeX
and FrameMaker), and Color PostScript. You can also create and save multi-layer
plots with RiverTools. See the section called Creating a Multi-Layer Plot for more
information on this topic.

Step 1.
Create a graphics window with one of the RiverTools routines. Modify the dialog box
settings, if necessary, and repeat until you are happy with the appearance of the plot.
You can use the File Set Colors dialog to change the colors.

Step 2.
Choose Print To File from the Options menu of the graphics window or from the
File menu in the main RiverTools window. The latter option applies to the current
window, which by default is the one that was created most recently.

Step 3.
Select the type of PostScript file you want to create from the PostScript options
droplist. To save the image in color, you would select Color PostScript.

Step 4.
If you want to save the new file in the current working directory, simply enter a filename in the text box. If you want to save the new file in a different directory, use the
Browse button to select the directory and specify the filename.

Step 5.
Click on the Options >> button to open a Printing Options dialog that lets you
change the size, position, orientation or resolution of the image. Choose the options
you want and then click on the OK button to dismiss the dialog.
For more information on how to use the Printing Options dialog (which can also be
accessed directly via the File menu), press the Help button or read the corresponding
section of Chapter 2 which explains how to use each of the RiverTools dialogs.

RiverTools Users Guide

Saving Graphics as PostScript

54

Chapter 1: Overview of RiverTools

Step 6.
Click on the OK button in the Print to File dialog to create the PostScript file.
Note
For raster images, such as many of the ones that you create with the dialogs in the
Display menu, you may be able to increase the resolution of the PostScript image
that you are preparing to produce. However, this will result in a larger PostScript
file. To increase the resolution, set the Reduction Factor in the Printing Options
dialog to a smaller integer value. This does not affect the width of the image on the
page (which can be set separately) but can sharpen raster images, such as Density
Plots, Shaded Relief, and Shaded Aspect. Keep in mind, however, that the maximum resolution of your printer is also a limitation. The Reduction Factor has no
affect on vector-drawn images, such as standard (not filled) Contour Plots.

Note
Under UNIX, you can check that the printer is printing your PostScript file by typing lpq and remove an entry from the printing queue using the lprm command.
To see how PostScript will look on the page before sending it to a printer (generally
a good idea), you can use a widely-available UNIX program for previewing PostScript files called gs. Simply type gs [filename] at the UNIX prompt. To exit
the program type quit. (The gs program is also available for Macs.)

Saving Graphics as PostScript

RiverTools Users Guide

Chapter 1: Overview of RiverTools

55

Saving Graphics Windows as Images


Step 1.
Create a graphics window with one of the RiverTools routines. Modify the dialog box
settings, if necessary, and repeat until you are happy with the appearance of the plot.
You can use the File Set Colors dialog to change the colors.

Step 2.
Choose Save Window from the Options menu of the window or Save Window As
from the Windows menu in the main RiverTools window. The latter option applies to
the current window, which by default is the one that was created most recently.

Step 3.
Select an image format from the droplist, (TIFF, BMP, PICT, JPEG, PNG, and so on)
and enter an appropriate filename and extension in the filename box.

Step 4.
If you want to save the new file in the current working directory, simply enter a filename in the text box. If you want to save the new file in a different directory, use the
Browse button to select the directory and specify the filename.
You should use the standard filename extension (or suffix) for the image format you
selected, since many applications use this extension to determine the file format. You
can review these standard extensions by clicking on the Help button at the bottom of
the dialog.

Step 5.
Click on the Start button to save the image. The window will be brought to the foreground, read from the screen as a byte array and then converted to the chosen format
using the current color table. The size and format of the image is printed in a small
information dialog and in the main log window when finished. Click on the Close
button when finished or to abort the save operation.

RiverTools Users Guide

Saving Graphics Windows as Images

56

Chapter 1: Overview of RiverTools

Step 6.
Though optional, it is always a good idea to check that your image looks like what
you expect. A good image-viewing program for UNIX machines is called xv, and
on Windows machines there is usually a basic image-viewing program called Paint
in Start Programs Accessories. If your image seems to have missing pieces,
you may need to change the way that backing store is handled on your computer. This
can be done via an option in the Graphics Windows category in the File Set Preferences dialog. See backing store in Appendix B, the RiverTools Glossary for more
information.

Saving Graphics Windows as Images

RiverTools Users Guide

Chapter 1: Overview of RiverTools

57

Creating Multi-Layer Plots


You can create multi-layer plots in RiverTools by overlaying any combination of vector-drawn images in the Display menu on top of any raster-drawn image in the same
menu. For example, you can overlay a River Network plot on a Basin Boundary plot,
or a Contour plot and a River Network plot on a Density Plot, or a Contour Plot on a
Shaded Relief plot, and so on. The steps are:

Step 1.
Choose Multi-Layer Plot from the Display menu. A simple dialog will appear with
several buttons along the bottom. You may want to click on the Help button for a
quick review of how the dialog works. Click on the Start button. A blank window
will appear beside the dialog. Leave both the window and dialog open and proceed to
Step 2.

Step 2.
If you dont want a raster layer, just skip this step. Otherwise, create a raster layer by
choosing Density Plot, Contour Plot (with fill option), Shaded Aspect, Shaded
Relief, or Masked Region (with the Interiors option) from the Display menu. Use
the dialog box for the routine that you selected in the same way as you normally
would, by adjusting settings and pressing the Start button. Notice that the image is
displayed in the blank window from Step 1. Close the display routine dialog but dont
close the Multi-Layer Plot dialog. Each of the routines listed above produces a raster layer, and there can be at most one raster layer in a multi-layer plot.

Step 3.
Add a vector layer by choosing Contour Plot (with the fill option off), River Network, Sources/Jcts, Masked Region (with the Boundaries option), ESRI Shapefile
or DLG-SDTS from the Display menu. Adjust settings in the dialog box of the routine you selected and press Start. Notice that the vector-drawn image is overlaid on
the raster image that was created in Step 2. Click on the Close button when the plot is
finished, but dont close the Multi-Layer Plot dialog yet. You can add any number of
vector layers to a multi-layer plot. Just repeat this step for any other vector layers that
you want to overlay on the image.

RiverTools Users Guide

Creating Multi-Layer Plots

58

Chapter 1: Overview of RiverTools

Step 4.
When you are finished adding layers to your multi-layer plot, press the Done button
in the Multi-Layer Plot dialog.
An example of a multi-layer plot is shown in the following figure. Note that the
Resize arrays by: Bilinear option in the Graphics Windows section of the File
Set Preferences dialog was selected to create smoother contour lines. The Display
Shaded Relief and Display Contour Plot dialogs were then used to create a
raster and vector layer. The file Small_tree.rtv was selected in the Display
River Network dialog, and overlaid on the contours. Finally, the Add Scale Bar tool
in the Tools menu of the windows menu bar was used to add the scale bar.

Figure 1-2: Multi-Layer Plot for Small Data Set

Creating Multi-Layer Plots

RiverTools Users Guide

Chapter 1: Overview of RiverTools

59

Exporting Data
RiverTools can extract a great deal of information from DEMs and has a rich set of
tools for displaying and analyzing this information. There are also many different
options for exporting this information in standard formats that allow it to be ingested
by other applications such as: (1) programs you have written, (2) desktop publishing
programs, (3) spreadsheets, (4) text editors, (5) web authoring programs, (6) presentation programs, (7) image manipulation and layout programs, (8) hydrologic models
and (9) other Geographic Information Systems.
This section gives a brief overview of some of the RiverTools dialogs that allow you
to export data. For complete details on how to use these dialogs, see Chapter 2, How
to Use the RiverTools Dialogs.

File Export Grid


This dialog allows you to export any RiverTools grid (RTG) file, such as a DEM, in
the following formats: ENVI Raster, ARC Raster, GeoTIFF, and Gridded ASCII.
RTG files typically have the extension .rtg. Georeferencing for every RTG file in a
given directory (in the same data set) is the same as that of the DEM in that directory
and is stored in an RiverTools Information (RTI) file. All of the information in the
RTI file except the data type applies to other RTG files as well as the DEM.

File Export Vector


This dialog allows you to export the spatial coordinates and measured attributes of
any RiverTools linkfile or streamfile to either an ESRI Shapefile or a multi-column
ASCII table. Linkfiles and streamfiles are examples of RiverTools Vector (RTV) files
and have the extensions _links.rtv and _streams.rtv. These files store a large
number of measured attributes for each link and Strahler stream in a given river network. For more information on what is measured, see the introduction to the section
called The Analyze Menu in Chapter 2. Many GIS programs (including RiverTools)
can import ESRI Shapefiles and the multi-column table can easily be imported into
spreadsheet programs.

Prepare Convert Grid


This dialog allows you to (1) import gridded data in basic formats such as flat binary
(including RTG files), plain ASCII, XDR binary, and FORTRAN 77 binary, (2) apply
many different kinds of conversion operations to the grid, and (3) export the grid
(including RTG files) to the binary, plain ASCII or XDR formats. An RTI file is created automatically for the new grid, if necessary.
RiverTools Users Guide

Exporting Data

60

Chapter 1: Overview of RiverTools

Prepare Convert Flow Grid


This dialog allows you to import or export D8 flow grids in the formats used by
Arc/Info (BIL), TOPAZ, and RiverTools. Each of these applications uses a flat binary
file with 1-byte or 2-byte integers to store the flow codes, but the flow codes themselves are different.

Extract Data from RTV File


This dialog is the predecessor of the File Export Vector dialog and lets you
extract attributes from RiverTools Vector (RTV) files and save them as two columns
in an ASCII text file. The File Export Vector dialog is much more powerful but
does not offer some of the functionality in this dialog, such as the ability to filter by
Strahler order.

Extract Grid from Treefile


RiverTools treefiles are stored in RTV files with the extension _tree.rtv. These
files store attributes and network topology for every pixel in a given basin. This dialog allows you to export attribute information to a grid as either flat binary (the same
as an RTG file) or ASCII. Pixels outside of the basin receive a nodata value of -1.

Options Save Profile to File


The interactive window tools called Line Profile and Channel Profile each have an
Options menu in their display window. In this menu there is a Save Profile to File
option that lets you export detailed information for the profile as a multi-column text
file. This file can be re-ingested and plotted by RiverTools via the Display Function dialog.

File Print to File


Any image that you create with RiverTools can be exported to a PostScript file as:
Standard (black and white), Encapsulated (black and white), Color, or Color Encapsulated. You can also access the Print to File dialog via the Options menu of any
graphics window.

Window Save Window As


Any image that you create with RiverTools can be exported in the following image
formats: Unformatted Byte Array, TIFF, Sun Raster, Windows Bitmap, Mac PICT,
JPEG, NRIF and PNG. These formats do not include georeferencing information and
the image need not be the same size as the grid (such as a DEM) that was used to proExporting Data

RiverTools Users Guide

Chapter 1: Overview of RiverTools

61

duce it. Use the File Export Grid dialog to export gridded data with georeferencing information. You can also access the Save Window As dialog via the Options
menu of any graphics window.

RiverTools Users Guide

Exporting Data

62

Chapter 1: Overview of RiverTools

Adding Extensions
If you purchased IDL (available from Research Systems, Inc.) in addition to RiverTools, then you can extend the functionality of RiverTools to suit your particular
needs by writing additional routines in IDL. IDL is a powerful and easy-to-learn,
array-based language. With IDL you can also create links to other programs that are
written in C or FORTRAN, and even add a graphical user interface for your program.
IDL programs are also virtually platform independent.
Suppose that you or one of your colleagues have written a program or subroutine in
IDL that you would like to be able to run from within RiverTools. The following
steps explain how to add this program to the RiverTools User menu so that it will be
launched when it is selected from the menu.

Step 1.
If RiverTools has been installed properly, you will find a text file called user.txt in
the Menu folder in the RiverTools folder. Make a backup copy of this file called
user.orig in the Menu folder.

Step 2.
Open the file user.txt with a plain text editor such as Notepad or Wordpad on Windows or vi on Unix. You will find that it contains several lines of text, with commas
between some of the words, phrases or numbers on each line. These are examples
that you can either keep or delete. The word or phrase that precedes the first comma
on any given line is used to supply the text that a user will see as the same-numbered
entry in the User menu. The word between the first and second commas on a line is
the name of the IDL procedure that is to be called when a user selects the corresponding entry from the User menu. Words or numbers between the remaining commas on
a line are interpreted as the arguments to the named IDL procedure.

Step 3.
Add comma-delimited lines similar to the examples to the file user.txt in order to
call your own IDL procedures. These can be (1) procedures that were saved in an IDL
6.0 .sav file (pronounced save file), (2) low-level RiverTools or IDL commands, or
(3) procedures defined in an IDL .pro file in the RiverTools Menu folder. The third
option is only available if you have both IDL and RiverTools. The first example in
the file user.txt calls a RiverTools procedure called RT_Plot_Von_Koch_Fractal
that plots the famous von Koch fractal curve. The next three lines are calls to other
low-level RiverTools procedures that are not accessible from the graphical user interAdding Extensions

RiverTools Users Guide

Chapter 1: Overview of RiverTools

63

face (GUI). The last line is a call to the free, open-source TopoFlow 1.0 hydrologic
model, which is included as an example plug-in to RiverTools. The TopoFlow procedure is defined in a .sav file in the Menu folder called: TF10_IDL60.sav.
As you make changes to the file user.txt, make sure to resave it as a plain text file.
Note
Your routines can be as simple or elaborate as you want. For example, your routine
can take its input from the command line or from a dialog box built out of IDLs
widget-building routines. You may simply wish to add a call to an existing IDL routine, or use IDLs CALL_EXTERNAL command to call a C or FORTRAN routine.
There are also many low-level RiverTools commands that you can take advantage
of when writing your own routines. One use of these is to extract information from
the many auxiliary files that are created by RiverTools. These commands are the
infrastructure around which RiverTools is built, and many of them are documented
in the RiverTools Command Reference.

Step 4.
When you have finished modifying the file user.txt, start RiverTools. Any IDL
.sav files found in the RiverTools Menu folder will be compiled automatically
when RiverTools starts up, and any procedures or functions contained within your
.sav file will be available to be called from the User menu. If you have also purchased IDL, then any IDL source code files with the extension .pro found in the
RiverTools Menu folder will also be compiled automatically. This allows users who
have purchased both RiverTools and IDL to write programs or models in IDL and
share them with other users that just have RiverTools.
Your changes to the User menu will appear every time you start RiverTools as long
as you leave the file user.txt in the RiverTools Menu folder.

RiverTools Users Guide

Adding Extensions

64

Chapter 1: Overview of RiverTools

Recommended Reading
River Network Extraction from DEMs
Band, L.E. (1986) Topographic partition of watersheds with digital elevation models,
Water Resour. Res., 22, 1524.
Costa-Cabral, M.C. and Burges, S.J. (1994), Digital elevation model networks
(DEMON): A model of flow over hillslopes for computation of contributing and dispersal areas, Water Resour. Res., 30(6), 16811692.
Fairfield, J. and P. Leymarie (1991) Drainage networks from grid digital elevation
models, Water Resour. Res., 27(5), 709717.
Freeman, T.G. (1991) Calculating catchment area with divergent flow based on a regular grid, Computers & Geosciences, 17(3), 413-422.
Garbrecht, J. and Martz, L.W. (1997) The assignment of drainage direction over flat
surfaces in raster digital elevation models, Journal of Hydrology, 193, 204213.
Helmlinger, K.R., Kumar, P., and Foufoula-Georgiou, E. (1993) On the use of DEM
data for Hortonian and fractal analyses of channel networks, Water Resour. Res.,
29(8), 25992613.
Hutchinson, M.F. (1989) A new procedure for gridding elevation and stream line data
with automatic removal of spurious pits, Journal of Hydrology, 106, 211232.
Jenson, S.K. (1984) Automated derivation of hydrologic basin characteristics from
digital elevation model data, U.S. Geol. Survey Pub. Nov. 15.
Jenson, S.K. (1991) Applications of hydrologic information automatically extracted
from digital elevation models, Hydrol. Proc., 5, 3144.
Jenson, S.K. and Domingue, J.O. (1988) Extracting topographic structure from digital elevation data for geographic information system analysis, Photogrammetric
Engineering and Remote Sensing, 54(11), 15931600.
Lammers, R.B. and Band, L.E. (1990) Automating object representation of drainage
basins, Computers & Geosciences, 16(6), 787810.
Martz, L.W. and Garbrecht, J. (1992) Numerical definition of drainage network and
subcatchment areas from digital elevation models, Computers & Geosciences, 8(6),
747761.

Recommended Reading

RiverTools Users Guide

Chapter 1: Overview of RiverTools

65

Moore, I., Grayson, R. and Ladson, A. (1991) Digital terrain modeling: A review of
hydrological, geomorphological, and biological applications, Hydrol. Proc., 5(1), 3
30.
OCallaghan, J.F. and Mark, D.M. (1984) The extraction of drainage networks from
digital elevation data, Computer Vision, Graphics, and Image Process., 28(3), 323
344.
Palacios-Velez, O.L. and Cuevas-Renaud, B. (1986) Automated river-course, ridge
and basin delineation from digital elevation data, J. Hydrol., 86, 299314.
Peckham, S.D. (1998) Efficient extraction of river networks and hydrologic measurements from digital elevation data, In: Stochastic Methods in Hydrology: Rain, Landforms and Floods, Barndorff-Nielsen et al. (eds.), World Scientific, Singapore, pp.
173203.
Peuker, I.K. and Douglas, D.H. (1975) Detection of surface-specific points by local
parallel processing of discrete terrain elevation data, Comp. Graph. Image Proc.,
4(4), 375387.
Qian, J., Ehrich, R.W. and Campbell, J.B. (1990) DNESYS: An expert system for
automatic extraction of drainage networks from digital elevation data, IEEE Trans.
Geosci. and Rem. Sens., 28(1), 2945.
Quinn, P., Beven, K., Chevallier, P. and O. Planchon (1991) The prediction of hillslope flow paths for distributed hydrologic modeling using digital terrain models,
Hydrol. Processes., 5, 5980.
Smith, T.R., Zhan, C. and Gao, P. (1990) A knowledge-based, two-step procedure for
extracting channel networks from noisy DEM data, Computers & Geosciences,
16(6), 777786.
Tarboton, D.G. (1997) A new method for the determination of flow directions and
upslope areas in grid digital elevation models, Water Resour. Res., 33(2), 309319.
Tarboton, D.G., Bras, R.L., and Rodriguez-Iturbe, I. (1991) On the extraction of channel networks from digital elevation data, Hydrol. Processes, 5, 81100.
Tribe, A. (1992) Automated recognition of valley lines and drainage networks from
grid digital elevation models: A review and a new method, Journal of Hydrology,
139, 263293.
Zhang, W. and Montgomery, D.R. (1994) Digital elevation model grid size, landscape representation, and hydrologic simulations, Water Resour. Res., 30, 1019
1028.

RiverTools Users Guide

Recommended Reading

66

Chapter 1: Overview of RiverTools

Identification of Channel Sources


Dietrich, W.E. and Dunne, T. (1993) The channel head, In: Channel Network Hydrology, Beven, K. and Kirkby, M.J., (eds.), Chichester, U.K., Wiley, 175220.
Montgomery, D.R. and Dietrich, W.E. (1989) Source areas, drainage density, and
channel initiation, Water Resour. Res., 25, 19071918.
Montgomery, D.R. and Dietrich, W.E. (1992) Channel initiation and the problem of
landscape scale, Science, 255, 826830.
Montgomery, D.R. and Foufoula, E. (1993) Channel network source representation
using digital elevation models, Water Resour. Res., 29(12), 39253934.

Topographic or Wetness Indices


Beven, K.J. and Kirkby, N.J. (1979) A physically based variable contributing area
model of basin hydrology, Hydrological Science B, 24, 4369.
Moore, I.D., Grayson, R.B. and Ladson, A.R. (1991) Digital terrain modelling: A
review of hydrological, geomorphological, and biological applications, Hydrologic
Processes, 5, 330.
OLoughlin, E.M. (1986) Prediction of surface saturation zones in natural catchments
by topographic analysis, Water Resources Research, 22, 794804.
Quinn, P.F., Beven, K.J. and R. Lamb (1995) The ln(a/tan(b) index: How to calculate
it and how to use it within the Topmodel framework, Hydrol. Proc., 9, 161182.
Western, A.W., Grayson, R.G., Bloschl, G., Willgoose, G.R. and McMahon, T.A.
(1999) Observed spatial organization of soil moisture and its relation to terrain indices, Water Resources Research, 35(3), 797810.
Wolock, D.M. and G.J. McCabe (1995) Comparison of single and multiple flow
direction algorithms for computing topographic paramters, Water Resources
Research, 31(5), 1315-1324.

Classic Studies of River Networks


Hack, J.T. (1957) Studies of longitudinal stream profiles in Virginia and Maryland,
Geological Survey Professional Paper 294-B.
Horton, R.E. (1932) Drainage basin characteristics, Am. Geophys. Union Tr., 350
361.

Recommended Reading

RiverTools Users Guide

Chapter 1: Overview of RiverTools

67

Horton, R.E. (1945) Erosional development of streams and their drainage basins:
hydrophysical approach to quantitative morphology, Geol. Soc. America Bull., 56,
275370.
Jarvis, R.S. and Woldenberg, M.J. (editors) (1984) River Networks, Benchmark
Papers in Hydrology, vol. 80, Hutchinson Ross, Pa.
Leopold, L.B. and Maddock, T. Jr. (1953) The hydraulic geometry of stream channels
and some geomorphologic implications, U.S. Geol. Surv. Prof. Paper 252.
Melton, M.A. (1959) A derivation of Strahlers channel-ordering system, J. Geol.,
67, 345346.
Schumm, S.A. (1956) Evolution of drainage systems and slopes in badlands at Perth
Amboy, New Jersey, Geol. Soc. Am. Bull., 67, 597646.
Strahler, A.N. (1957) Quantitative analysis of watershed geomorphology, Am. Geophys. Union Trans., 38(6), 913920.
Strahler, A.N. (1964) Quantitative geomorphology of drainage basins and channel
networks, In: Handbook of Applied Hydrology, edited by V.T. Chow, pp. 4-39 to 4-76,
McGraw-Hill, New York.

Hypsometric (Area-Altitude) Analysis


Harlin, J.M. (1977) Statistical moments of the hypsometric curve and its density
function, Mathematical Geology, 10(1), 5973.
Howard, A.D. (1990) Role of hypsometry and planform in basin hydrologic
response, Hydrological Processes, 4, 373385.
Luo, W. (1998) Hypsometric analysis with a geographic information system, Computers & Geosciences, 24(8), 815-821.
Pike, R.J. and Wilson, S.E. (1971) Elevation-relief ratio, hypsometric integral, and
geomorphic area-altitude analysis, Geological Society of America Bulletin, 82,
10791084.
Strahler, A.N. (1952) Hypsometric (area-altitude) analysis of erosional topography,
Bulletin of the Geological Society of America, 63, 11171142.

Longitudinal Profile Analysis


Broscoe, A.J. (1959) Quantitative analysis of longitudinal stream profiles of small
watersheds, Office Naval Res. Tech. Rep. 18, Columbia Univ., New York, 73 pp.

RiverTools Users Guide

Recommended Reading

68

Chapter 1: Overview of RiverTools

Howard, A.D. (1998) Long profile development of bedrock channels: Interaction of


weathering, mass wasting, bed erosion, and sediment transport, Geophys. Mono.,
107, 297319.
Mackin, J.H. (1948) Concept of the graded river, Geol. Soc. Am. Bull., 101, 1373
1388.
Ohmori, H. (1989) Change in the mathematical function type describing the longitudinal profile of a river through an evolutionary process, J. of Geology, 99, 97110.
Roe, G.H., Montgomery, D.R. and B. Hallet (2002) Effects of orographic precipitation variations on the concavity of steady-state river profiles, Geology, 30(2), 143146.
Sinha, S.K., Parker, G. (1996) Causes of concavity in longitudinal profiles of rivers,
Water Resources Research, 32(5), 14171428.
Smith, T.R, Merchant, G.E., Birnir, B. (2000) Transient attractors: Towards a theory
of the graded stream for alluvial and bedrock channels, Computers & Geosciences,
26, 541580.
Snow, R.S. and Slingerland, R.L. (1986) Mathematical modeling of graded river profiles, Journal of Geology, 95, 1533.
Yang, C.T. (1971) Potential energy and stream morphology, Water Resources
Research, 7(2), 311322.
Yatsu, E. (1955) On the longitudinal profile of the graded river, Trans. Am. Geophys.
Union, 36, 655663.

Sources of Digital Elevation Data


See the Data Links page at www.rivertools.com.
US Geological Survey (1987) Digital Elevation Models, Data Users Guide, 5, 38
pp., National Mapping Program, USGS, Reston, VA.

Fractals
Avnir, D., Biham, O., Lidar, D. and Malcai, O. (1998) Is the geometry of nature fractal?, Science, 279, 3940.
Barnsley, M. (1988) Fractals Everywhere, Academic Press, New York.
Edgar, G.A. (1993) Classics on Fractals, Addison-Wesley, New York. (Reprints of
original papers by Cantor, von Koch, Weierstrauss, Hausdorff, and other famous
mathematicians.)
Recommended Reading

RiverTools Users Guide

Chapter 1: Overview of RiverTools

69

Falconer, K. (1990) Fractal Geometry: Mathematical Foundations and Applications,


Wiley, New York.
Korvin, G. (1992) Fractal Models in the Earth Sciences, Elsevier, New York.
Mandelbrot, B.B. (1983) The Fractal Geometry of Nature, Freeman and Co., New
York.
Peano, G. (1890) A space-filling curve, English translation in: Selected Works of
Giuseppe Peano (1973) Kennedy, H.C., Univ. of Toronto Press.
Peitgen, H.O., Jurgens, H., and Saupe, D. (1992) Chaos and Fractals: New Frontiers
of Science, Springer-Verlag, New York. (Note: Appendix B is an expository article
on multifractals by Evertsz, C.J.G and Mandelbrot, B.B.)
Schroeder, M. (1991) Fractals, Chaos, Power Laws: Minutes from an Infinite Paradise, Freeman and Co., New York.
Turcotte, D.L. (1992) Fractals and chaos in geology and geophysics, Cambridge
Univ. Press, Cambridge, Great Britain.

River Networks as Fractals


Beer, T. and Borgas, M. (1993) Hortons laws and the fractal nature of streams, Water
Resour. Res., 29, 14751487.
De Vries, H., Becker, T., and Eckhardt, B. (1994) Power law distribution of discharge
in ideal networks, Water Resour. Res., 30(12), 3541.
Gupta, V.K. and Waymire, E.C. (1989) Statistical self-similarity in river networks
parameterized by elevation, Water Resour. Res., 25(3), 463476.
Hjelmfelt, A.T. (1988) Fractals and the river-length catchment-area ratio, Water
Resour. Bull., 24, 455459.
La Barbera, P. and Rosso, R. (1987) Fractal geometry of river networks, EOS Trans.
AGU, 68(44), 1276.
La Barbera, P. and Rosso, R. (1989) On the fractal dimension of stream networks,
Water Resour. Res., 25(4), 735741.
Marani, A., Rigon, R, and Rinaldo, A. (1991) A note on fractal channel networks,
Water Resour. Res., 27(12), 30413049.
Nikora, V.I. and Sapozhnikov, V.B. (1993) River network fractal geometry and its
computer simulation, Water Resour. Res., 29, 35693575.

RiverTools Users Guide

Recommended Reading

70

Chapter 1: Overview of RiverTools

Rodriguez-Iturbe, I. and Rinaldo, A. (1997) Fractal River Basins, Cambridge Univ.


Press, Cambridge, UK.
Tarboton, D.G., Bras, R.L, and Rodriguez-Iturbe, I. (1988) The fractal nature of river
networks, Water Resour. Res.,24, 13171322.

The Self-Similar Tree Model


Bahr, D.B. and Peckham, S.D. (1996) Observations and analysis of self-similar
branching topology in glacier networks, J. Geophys. Res., 101(B11), 2551125521.
Burd, G.A., Waymire, E.C. and Winn, R.D. (2000) A self-similar invariance of critical binary Galton-Watson trees, Bernoulli, 6(1), 121.
Peckham, S.D. (1995a) New results for self-similar trees with applications to river
networks, Water Resour. Res., 31(4), 10231029.
Peckham, S.D. (1995b) Self-similarity in the three-dimensional geometry and
dynamics of large river basins, PhD thesis, University of Colorado, Boulder, CO.
Peckham, S.D. and Gupta, V. (1999) A reformulation of Hortons laws for large river
networks in terms of statistical self-similarity, Water Resources Research, 35(9),
27632777.
Tarboton, D.G. (1996) Fractal river networks, Hortons laws and Tokunaga cyclicity,
J. Hydrol., 187, 105117.
Tokunaga, E. (1966) The composition of drainage network in Toyohira River Basin
and valuation of Hortons first law, Geophys. Bull. Hokkaido Univ., 15, 119. (In
Japanese with English summary.)
Tokunaga, E. (1978) Consideration on the composition of drainage networks and
their evolution, Geographical Report No. 13, Tokyo Metropolitan Univ.
Veitzer, S. and Gupta, V. (2000) Random self-similar river networks and derivations
of generalized Horton laws in terms of statistical simple scaling, Water Resources
Research, 36(4), 10331048..

Scheideggers Model
Nguyen, B.G. (1990) Percolation of coalescing random walks, Appl. Probab., 269
277.
Scheidegger, A.E. (1967) A stochastic model for drainage patterns into an intramontane trench, Intl. Assoc. Sci. Hydrol. Bull., 12, 1520.

Recommended Reading

RiverTools Users Guide

Chapter 1: Overview of RiverTools

71

Takayasu, H., Takayasu, M., Provata, A. and Huber, G. (1991) Statistical properties of
aggregation with injection, J. Stat. Phys., 65(3/4), 725745.
Takayasu, M. and Takayasu, H. (1989) Apparent independency of an aggregation
system with injection, Phys. Rev. A, 39(8), 43454347.

The Random Topology Model and Width Functions


Gupta, V.K., Waymire, E.C. and Wang, C.T. (1980) A representation of an instantaneous unit hydrograph from geomorphology, Water Resour. Res., 16(5), 855862.
Gupta, V.K. and Waymire, E.C. (1989) Statistical self-similarity in river networks
parameterized by elevation, Water Resour. Res., 25(3), 463476.
Kirkby, M.J. (1976) Tests of the random network model, and its application to basin
hydrology, Earth Surf. Processes, 1, 197212.
Shreve, R.L. (1966) Statistical law of stream numbers, J. Geol., 74, 1737.
Shreve, R.L. (1967) Infinite topologically random channel networks, J. Geol., 75,
179186.
Shreve, R.L. (1969) Stream lengths and basin areas in topologically random channel
networks, J. Geol., 77, 397414.
Troutman, B.M. and Karlinger, M.R. (1984) On the expected width function for topologically random channel networks, J. Appl. Prob., 21, 836849.
Wang, S.X. and Waymire, E.C. (1991) A large deviation rate and central limit theorem for Horton ratios, SIAM J. Disc. Math., 4, 575588.
Werner, C. (1970) Hortons law of stream numbers for topologically random channel
networks, Canadian Geographer, XIV(1), 5766.

Optimal Channel Network Models


Howard, A.D. (1994) A detachment-limited model of drainage basin evolution,
Water Resour. Res., 30(7), 22612285.
Maritan, A., Colaiori, F., Flammini, A., Cieplak, M. and Banavar, J.R. (1996) Universality classes of optimal channel networks, Science, 272, 984986.
Rigon, R., Rinaldo, A., Rodriguez-Iturbe, I., Bras, R.L. and Ijjasz-Vasquez, E. (1993)
Optimal channel networks: A framework for the study of river basin morphology,
Water Resour. Res., 29(6), 16351646.

RiverTools Users Guide

Recommended Reading

72

Chapter 1: Overview of RiverTools

Rodriguez-Iturbe, I., Ijjasz-Vasquez, E., Bras, R.L. and Tarboton, D.G. (1992) Power
law distributions of mass and energy in river basins, Water Resour. Res., 28(4),
10891093.
Sinclair, K., and Ball, R.C. (1996) A mechanism for global optimization of river networks from local erosion rules, Phys. Rev. Lett., 76, 33603363.
Sun, T., Meakin, P. and Jossang, T. (1994) The topography of optimal drainage
basins, Water Resour. Res., 30(9), 25992610.

Other River Network Models


Troutman, B.M. and Karlinger, M.R. (1989) A random spatial network model based
on elementary postulates, Water Resour. Res., 25(5), 793.
Troutman, B.M. and Karlinger, M.R. (1998) Spatial channel network models in
hydrology, In: Stochastic Methods in Hydrology: Rain, Landforms and Floods, Barndorff-Nielsen et al. (eds.), World Scientific, Singapore, pp. 85127.
Van Pelt, J., Woldenberg, M.J. and Verwer, R.W.H. (1989) Two generalized topological models of stream network growth, J. Geol., 97, 281299.
Werner, C. (1972) Two models for Hortons law of stream numbers, Canadian Geographer, XVI(1), 5068.

Fluvial Landscape Models


Howard, A.D. (1994) A detachment-limited model of drainage basin evolution,
Water Resources Research, 30(7), 22612285.
Peckham, S.D. (1999) Solutions to nonlinear partial differential equations a geometric approach. In: Barndorff-Nielsen, O.E., Vedel Jensen, E.B. (Eds.), Proceedings
of the Conference on Geometry in Present-Day Science, Word Scientific, New Jersey,
165186.
Peckham, S.D. (2003) Fluvial landscape models and catchment-scale sediment transport, Global and Planetary Change, 39, 3151.
Peckham, S.D. (2003) Mathematical modelling of landforms: Optimality and steadystate solutions, In: Concepts and Modelling in Geomorphology: International Perspectives, Eds. I.S. Evans, R. Dikau, E. Tokunaga, H. Ohmori, and M. Hirano, 167
182, TERRAPUB, Tokyo.
Smith, T.R. and Bretherton, F.P. (1972) Stability and the conservation of mass in
drainage basin evolution, Water Resources Research, 8(6), 15061529.

Recommended Reading

RiverTools Users Guide

Chapter 1: Overview of RiverTools

73

Smith, T.R., Birnir, B. and Merchant, G.E. (1997a) Towards an elementary theory of
drainage basin evolution: I. The theoretical basis, Computers & Geoscience, 23(8),
811822.
Smith, T.R., Merchant, G.E. and Birnir, B. (1997b) Towards an elementary theory of
drainage basin evolution: II. A computational evaluation, Computers & Geoscience,
23(8), 823849.
Tucker, G.E., Bras, R.L. (1994) Simulation of observed topography using a physically-based basin evolution model, Ralph M. Parsons Laboratory Rep. No. 340,
Dept. of Civ. Engr., MIT, Cambridge, MA.
Tucker, G.E., Bras, R.L. (1998) Hillslope processes, drainage density, and landscape
morphology, Water Resources Research, 34(10), 27512764.
Willgoose, G., Bras, R.L., Rodriguez-Iturbe, I. (1991a) A coupled channel network
growth and hillslope evolution model: 1. Theory, Water Resources Research, 27,
16851696.
Willgoose, G., Bras, R.L., Rodriguez-Iturbe, I. (1991b) A coupled channel network
growth and hillslope evolution model: 2. Nondimensionalization and applications,
Water Resources Research, 27, 16711684.

Topographic Analysis and Curvature


Evans, I.S. (1972) General geomorphometry, derivatives of altitude, and descriptive
statistics, 1790, In: Chorley, R.J. (Ed.) Spatial analysis in geomorphology, Methuen, London, 393pp.
Heerdegen, R.G. and Beran, M.A. (1982) Quantifying source areas through land surface curvature and shape, J. Hydrology, 57, 359373.
Mitasova, H. and Mitas, L. (1993) Interpolation by regularized spline with tension: II.
Theory and implementation, Mathematical Geology, 25, 641655.
Mitasova, H. and Hofierka, J. (1993) Interpolation by regularized spline with tension:
II. Application to terrain modeling and surface geometry analysis, Mathematical
Geology, 25, 657669.
Rektorys, K. (1969) Survey of Applicable Mathematics, MIT Press, Cambridge, MA,
Iliffe Books, Ltd., London, 365pp.
Wood, J. (1996) The geomorphological characterization of digital elevation models,
PhD thesis, University of Leicester, UK. (http://www.soi.city.ac.uk/~jwo/phd/)
Zevenbergen, L.W. and C.R. Thorne (1987) Quantitative analysis of land surface
topography, Earth Surface Processes and Landforms, 12, 4756.
RiverTools Users Guide

Recommended Reading

74

Chapter 1: Overview of RiverTools

Map Projections
Snyder, J.P. (1987) Map Projections A Working Manual, U.S. Geological Survey
Prof. Paper 1395, U.S. Gov. Printing Office, Washington.
Note
The US Geological Survey National Mapping Program has produced a poster called
Map Projections with a picture of Gerardus Mercator on the front and a nice tutorial discussion of eighteen different map projections on the back. Contact:
Earth Science Information Center
U.S. Geological Survey
507 National Center
Reston, VA 22092
1-800-USA MAPS

Recommended Reading

RiverTools Users Guide

Chapter 2:

How to Use the


RiverTools Dialogs
This chapter contains detailed information on how to use each of the RiverTools dialogs. It is organized so as to mirror the layout of the RiverTools graphical user interface. It contains eight major sections, one for each of the menus in the RiverTools
menu bar, which are File, Prepare, Extract, Display, Analyze, Window, User, and
Help. Each of these sections contains a discussion of all of the dialogs in the corresponding menu, in the same order as they appear in the menu. The heading for the
section that describes a given dialog is just the path that you would use in order to
open that dialog. For example, the first heading below is File Open Data Set, and
describes the Open Data Set dialog in the File menu.

76

Chapter 2: How to Use the RiverTools Dialogs

The File Menu


File Open Data Set
This opens a native file selection dialog that lets you select the RiverTools data set
that you want to work with. A RiverTools data set consists of a collection of files that
are all related to and generated from the sole input of a digital elevation model or
DEM. (See the glossary for more detailed information about DEMs.) Since the DEM
is the star of the show, you choose a data set by choosing a DEM. RiverTools grid
files have filenames that end in the extension .rtg. All of the grid files in a given
data set have the same dimensions and other descriptive information (except for data
type), which is stored in a grid info file that has the extension .rti. You should create a separate directory for each data set you want to work with, and keep all of the
related files in this directory.

File Change Basin Prefix


RiverTools uses and creates many different types of files. When working with many
files, it is convenient for related files to have names that begin with the same prefix.
The remainder of the filename is called the extension, and can be simply the letters
after the dot, or a compound extension that contains additional descriptive information between an underscore and the dot.
In a given data set, there is a data prefix that is used for the DEM, derived grids, and
related files. However, you can also associate one or more basin prefixes with files
that pertain to particular basins in the DEM.
Basin prefixes are a powerful way to work with multiple basins in a single DEM.
Several dialogs in the Extract menu prompt you for a basin prefix and create data
files with this prefix. Once extracted, you can work with these files again by changing the basin prefix with this dialog. Several of the tools in the Analyze menu operate on files with the current basin prefix.
For compatibility with version 1.0, RiverTools allows you to choose between two sets
of extensions. For flexibility, you can also temporarily redefine one or more extensions via this dialog. Just select a file type from the droplist, enter a new extension,
and press the Use this instead button. However, you are less likely to encounter
problems if you use the standard extensions.

The File Menu

RiverTools Users Guide

Chapter 2: How to Use the RiverTools Dialogs

77

Figure 2-1: The Change Basin Prefix dialog.

File Import DEM


Select the file format of the DEM you want to import from the pull-down menu. Your
computers native file selection dialog will then appear so that you can select the file
which contains the DEM.
Once you have selected a file, the Import DEM dialog will appear. The file format
you selected and the path to the file you selected are shown in the top two text boxes
of the dialog. The bottom text box shows the name of the RiverTools Grid (RTG) file
that will be created as a result of the import process. In the case of the two USGS formats, the map title will be used to construct a default filename for the RTG file. You
can edit the input and output filenames or use the Browse button at the bottom to
select an output destination directory and filename. You can also use a single matching wildcard (an asterix) in the input and output filenames to import several DEMs
as a batch process.

RiverTools Users Guide

The File Menu

78

Chapter 2: How to Use the RiverTools Dialogs

Some binary formats, like ARC Raster and ENVI Raster, are identical to the RiverTools DEM format and do not need to be modified or renamed. For these, the output
filepath will default to the input filepath and RiverTools will simply create a RiverTools Information (RTI) file that describes the DEM using information in the ARC or
ENVI header file.
For other formats, like SDTS, RiverTools will resave the DEM data as a RiverTools
Grid (RTG) file. RTG files are in a flat binary, row major format that is efficient to
access and compatible with other software.
If possible, a RiverTools information file (.rti) will be created automatically. Otherwise, you will be asked to provide the information needed to create an RTI file for the
DEM.
For more information, see the section Importing a DEM in Chapter 1.

File Export Grid


RiverTools, ENVI, and ARC all store raster data in flat binary files, in row major format. However, each has its own ASCII header file that contains georeferencing and
other descriptive information.
This dialog allows you to create an ARC or ENVI header file from an existing RiverTools RTI file. It can also export a grid to GeoTIFF or gridded ASCII format. You
can export a DEM or any other RiverTools grid (.rtg).

File Export Vector Channels


This routine allows you to export the spatial coordinates and attributes of channel
links or Horton-Strahler streams stored in a RiverTools Vector (RTV) file to other
vector formats, such as ESRI shapefiles and text files.
To export information for links, enter a filename that ends in _links.rtv. To export
info for Horton-Strahler streams, the filename should end in _streams.rtv.
Choose the attributes you wish to include by checking the box next to the attribute.
See Appendix B, the RiverTools Glossary for definitions of these attributes. This routine uses the current D8 flow grid to create a shapefile, and dropouts may occur if it
differs from the flow grid that was used to create the RTV file.

File Export Vector Boundaries


This dialog allows you to export the spatial coordinates of shape or mask cell
boundaries stored in a RiverTools Mask (RTM) file to an ESRI shapefile. For example, this dialog allows you to export basin boundaries. Boundary coordinates are
The File Menu

RiverTools Users Guide

Chapter 2: How to Use the RiverTools Dialogs

79

stored in clockwise order and the attributes area, shape diameter (furthest distance
between any two boundary points), and shape factor are also stored. For DEMS with
Geographic coordinates, the currently selected ellipsoid model is used for these measured attributes. See Appendix B, the RiverTools Glossary for definitions of these
attributes. You can re-import and display the new shapefile with the Display ESRI
Shapefile dialog.

File View Data Set Info


This dialog shows partial information about the set of individual files that make up
the current RiverTools data set. These files are stored in the current directory, which
is listed at the bottom of the main log window.
Entries which have the filename None and size 0 indicate data objects that RiverTools can create and work with, but which have not been created yet or have nonstandard names. These missing files can be created with the tools in the Extract
menu. You may need to scroll down to see some of the data objects.
RTG files (RiverTools Grid) are assumed to contain raw binary data and to have the
same dimensions and byte order as the DEM or elevation grid.

File View DEM Info


This dialog shows information read from an RTI (RiverTools Information) file in the
current working directory. It describes the currently selected DEM. This dialog can
also be used to edit or create an RTI file for the currently selected DEM. All of the
information shown is required in order for geometric calculations and mosaicking
operations to be accurate. In most cases, as when you import a DEM via the File
Import DEM dialog, you will not need to edit the information shown. When necessary, however, you can make changes to an RTI file by changing settings and values
in the dialog and then clicking on the Save Changes button. The name of the affected
RTI file is listed in the title bar of the dialog.
Information in an RTI file also describes other RTG (RiverTools Grid) files in the
current data set, except for the data type and min and max elevation. The data types
for some RTG files other than the DEM are displayed in the File View Data Set
Info dialog.

RiverTools Users Guide

The File Menu

80

Chapter 2: How to Use the RiverTools Dialogs

Figure 2-2: The View DEM Info dialog.


DEMs typically have one of two pixel geometries, which are referred to in RiverTools as fixed-angle and fixed-length. These usually correspond to Geographic and
UTM (Cartesian) coordinate systems. For DEMs with fixed-angle pixels, the x-size
and y-size must be entered in the units of arcseconds (seconds of arc; there are 3600
arcseconds per degree). For DEMs with fixed-length pixels, you must specify the xsize and y-size in units of meters. You can also consult Appendix B, the RiverTools
Glossary for more information and definitions of some of the terms in this dialog,
such as byte order and data type.
The Bounding Box Information gives the coordinates of the smallest box (in the
given coordinate system) that completely encloses the DEM. These are given in decimal degrees latitude and longitude for DEMs with fixed-angle pixels, and in this case
the edges of the bounding box coincide with the edges of the DEM. Longitudes west
of the prime meridian and latitudes south of the equator must be negative. For DEMs
with fixed-length pixels the bounding box coordinates are given in UTM coordinates

The File Menu

RiverTools Users Guide

Chapter 2: How to Use the RiverTools Dialogs

81

(meters), and the edges of the bounding box will not coincide with the edges of the
DEM. You can check the basic validity and consistency of the bounding box information by clicking on the Check Info button at the bottom of the dialog.
It is often useful to know the min and max elevation for a DEM. If you click on the
Get Min/Max button at the bottom of the dialog, RiverTools will compute the minimum and maximum data values for you and copy them into the dialog. The minimum
value found in the DEM (whether above or below the current nodata threshold that is
specified in the preferences) is also printed in the main log window. If the text boxes
for the min and max values are blank, you should click on the Get Min/Max button
and then click on the Save Changes button to record the min and max values in the
RTI file. Otherwise RiverTools will recompute them every time it needs them.
If the min and max values appear to be unreasonably large or small, it probably
means that the byte order setting in the dialog is incorrect. In this case, change to the
other byte order setting and click on the Get Min/Max button again. If this results in
reasonable min and max values, you should click on the Save Changes button. This
action is reversible and simply alters the RTI file; it does not cause the values in the
DEM file to be byte-swapped.
RiverTools data sets can be shared with computers that use the opposite byte order
convention as long as (1) the correct byte order for the DEM is recorded in the RTI
file, and (2) all of the binary files in the data set have the same byte order as the
DEM. When necessary, RiverTools will automatically perform byte-swapping of data
as it is read from a binary file, without altering the original file. In some cases you
may want to byte swap the values in the binary file itself. This functionality is available in the Prepare Convert Grid dialog and is reversible. See byte order in
Appendix B, the RiverTools Glossary for more information on this issue.
If any of the terms used in this dialog are unfamiliar to you, it is a good idea to read
the section in Chapter 1 of the RiverTools Users Guide called Top 10 Things You
Should Know About DEMs on page 28. You can also access the RiverTools Glossary from the Help menu and look up the term there.

File View Basin Info


After you have used the first four tools in the Extract menu to compute information
for one or more subbasins in your DEM, you can view a convenient summary of that
information here. This dialog shows the main attributes of the current basin, as specified by the current basin prefix. You can change the basin prefix with the File
Change Basin Prefix dialog. (See Appendix B, the RiverTools Glossary for the definitions of any attribute names that are unfamiliar to you.) Included among the
attributes are the coordinates of the outlet, the basin area and relief, and the pruning

RiverTools Users Guide

The File Menu

82

Chapter 2: How to Use the RiverTools Dialogs

method and pruning threshold that you chose when you processed the basin. Each
basin that you extract information for will have its own basin prefix and a set of associated files that contain, for example, detailed information for every pixel and subbasin that is contained in that basin.
Another way to use basin prefixes is to process the same basin (having the same outlet) with a different pruning method and/or threshold. This allows you to explore the
sensitivity of certain attributes, like the number of first-order streams, to the pruning
method and threshold. There is still not universal agreement as to which pruning
method is best or how pruning thresholds should be determined, but RiverTools
offers a wide variety of alternatives.

The File Menu

RiverTools Users Guide

Chapter 2: How to Use the RiverTools Dialogs

83

Figure 2-3: View Basin Info Dialog

File View Text File


This dialog lets you view and search the contents of any text (ASCII) file, including
RiverTools Information (RTI) files that have the extension .rti and RiverTools log
files that have the extension .log. You can page through the text file one page at a
time using the arrow buttons, or you can jump to a particular page by entering a page
number and clicking on the Page button. To search for a particular word, enter it in
the text box beside the Find button and click on the Find button.

RiverTools Users Guide

The File Menu

84

Chapter 2: How to Use the RiverTools Dialogs

File Set Colors


This dialog lets you preview and select from a variety of different color schemes (or
color tables) that are used by various RiverTools routines. Changes that you make
here will stay in effect until you change them again. They can also be saved as preferences; when you save preferences via the File Set Preferences dialog, the current
color information is also saved. Even though some routines offer color selections in
their associated dialogs, this is the master control for colors. For more detailed
information on this dialog, see the section called Setting Colors in Chapter 1.

Figure 2-4: The RiverTools Color Tool.

File Set Preferences


You can customize RiverTools to suite your personal preferences and/or current
needs in a variety of ways. Preferences are grouped into different categories or preference types. When you select a Preference type from the droplist of choices, the
dialog will be updated to display the current preference settings for that preference
type. You can restore the default settings for a preference type by clicking on the
Restore Defaults button, if present. Preferences sometimes represent global settings, such as Planet Info, which is needed in order to correctly compute lengths and
areas for DEMs with fixed-angle pixels. For more detailed information on this dialog,
see the section entitled Setting Preferences in Chapter 1.

The File Menu

RiverTools Users Guide

Chapter 2: How to Use the RiverTools Dialogs

85

Figure 2-5: Startup Directory panel of the Set Preferences dialog.

File Printer Setup


This opens a native printer setup dialog that is the same one used by your other applications. What you see in this dialog depends on the capabilities of your printer.

File Printing Options


The information in this dialog is used by RiverTools to set the size, position, orientation, and resolution of an image that is to be printed to the printer or to a PostScript
file. Images can be sent to the printer via File Print or by selecting Options
Print in a graphics window. Images can be sent to a PostScript file via File Print
To File or by selecting Options Print To File in a graphics window.

RiverTools Users Guide

The File Menu

86

Chapter 2: How to Use the RiverTools Dialogs

The current aspect ratio (ratio of width to height) of the image in the display window
is preserved, but the width on the page can be set to any value less than the paper
width. You can also adjust the margins.
Many of the dialogs in the Display menu create raster images, such as Density Plot,
Shaded Relief, and Shaded Aspect. By default, raster images are printed at the highest resolution supported by your printer. You can reduce the resolution below this
value by entering a reduction factor larger than the one shown. The width required to
print a DEM-based image at full resolution is also shown. Keep in mind that printing
large images at full resolution can result in very large PostScript files, and your
printer may not be able to handle files of this size. Vector-based images such as line
drawings and contour plots are unaffected by the reduction factor.
If you have burned a color bar, scale bar, or other raster annotation into an image,
you will need to select the option Print via screen capture in order for these to be
included in the printed image.
Sometimes printers add a small amount to the margins which you may need to subtract. You can confirm that margins are set correctly by printing to a PostScript file
via File Print To File, and viewing it with a PostScript-viewing utility.

File Print To File


Any plot or image that you can create with RiverTools can be saved as a PostScript
file, which can then be sent to a printer or embedded in a document. Line drawings
and other vector-drawn plots will often look much better when saved and printed as
PostScript as opposed to being saved as a raster image. This is because the PostScript
page description language represents objects like lines and curves in a scale-independent format. This allows them to be printed or displayed at the resolution of the
printer, which is usually higher than the resolution of your computer monitor.
Create a graphics window with one of the RiverTools routines. Modify the dialog box
settings, if necessary, and repeat until you are happy with the appearance of the plot.
Open this dialog and choose a PostScript option from the droplist of choices. Notice
that Encapsulated PostScript (for embedding in a document preparation program)
and Color PostScript are included in this droplist. Enter a filename that ends with
the extension that is suggested next to each of the PostScript options. These extensions are fairly standard and help other people and programs to quickly identify the
file type. The other controls allow you to control the orientation of the image on the
page (portrait or landscape style), the on-page width, and the left and top margins.
Click on the OK button to print the image to the specified file. If multiple graphics
windows are present, it is better to print by choosing Print To File from the Options
menu in the upper left corner of the graphics window.

The File Menu

RiverTools Users Guide

Chapter 2: How to Use the RiverTools Dialogs

87

You can control the size, position, orientation, and resolution of an image to be
printed via the File Printing Options dialog.

File Print
This opens your computers native Print dialog. Click on OK to send the most
recently created image to your printer. If multiple graphics windows are present, it is
better to print by choosing Print from the Options menu in the upper left corner of
the graphics window. Use the Printer Setup and Printing Options dialogs in the
File menu to control various attributes of the printed image.

File Exit
This is how you exit the RiverTools application. By default, you will get a Confirm
Exit dialog before RiverTools exits. To turn off this feature, choose Set Preferences
from the File menu, choose General from the droplist of preference types, and click
on the No button.

RiverTools Users Guide

The File Menu

88

Chapter 2: How to Use the RiverTools Dialogs

The Prepare Menu


The Prepare menu contains a variety of tools that simplify the task of preparing input
data from different sources. A DEM mosaicking tool, Patch RTG DEMs, is also
included in this menu.

Prepare Convert Grid


This dialog helps you to preprocess grids in various ways and to convert them to
other data types and formats. You should use the File Import DEM dialog to
import DEMs and the File Export Grid dialog to export a DEM or any other RTG
file. Descriptive info for your input grid is shown on the left-hand side, and info for
the output grid is on the right-hand side.
Describe your input grid by providing its filename, data format, data type, number of
rows and columns, and header size (if any). You can use the Browse button to select
an input grid. RiverTools will copy whatever information it can find for this grid into
the dialog.
Next, tell RiverTools what you want to have done to this grid to create a new output
grid by making selections from the droplists on the output side. For example, you
can have your DEM reduced (or rebinned) to a smaller size. Or you can convert it to
a new format or data type by making selections from the droplists on the output side
of the dialog. There is also a droplist of functions at the bottom of the dialog that you
can apply to your input DEM, which includes things like rotations, byte-swapping,
unit conversion, and automatic cropping of nodata margins. By default, the output
grid is saved in the current working directory, but you can select another directory
with the Browse button on the right-hand side.
If the descriptive information (except for filename) on the input and output sides are
exactly the same, and if there is no reduction and no function, then this tool just
makes a copy of the input DEM with a new name.

The Prepare Menu

RiverTools Users Guide

Chapter 2: How to Use the RiverTools Dialogs

89

Figure 2-6: The Convert Grid dialog.


Another useful feature of this tool is that if you have several input DEMs whose
descriptive information is very similar (except for the filenames and bounding boxes)
you can apply the same operations to all of them as a batch job by using a single
matching wildcard (an asterix) in your specification of the Input DEM name and
Output DEM name. For example, suppose you had two similar DEMs with the
names data1.dem and data2.dem that you wanted to apply some operation to in
order to create two new DEMs called data1_DEM.rtg and data2_DEM.rtg . Then
you could just enter data*.dem as the Input DEM name and data*_DEM.rtg as
the Output DEM name. If any of the output filenames that match your wildcard specification already exist, you will be warned before they are overwritten.

RiverTools Users Guide

The Prepare Menu

90

Chapter 2: How to Use the RiverTools Dialogs

Prepare Convert Flow Grid


This tool allows you to import D8 flow grids from other sources into RiverTools.
Notice that this dialog has descriptive information for your input flow grid on the left
side, and information for the output flow grid you are going to create on the right
side. You describe your input flow grid by providing its filename, data format, data
type, and flow codes. If your flow grid was created by Arc/Info, TOPAZ or RiverTools, then you can just indicate this by making a selection from the Flow codes
droplist. Otherwise, you can enter D8 flow codes directly into the 3 by 3 set of text
boxes. These are laid out so that north is at the top and east is to the right. Click on the
Help button in this dialog or see the Appendix B, the RiverTools Glossary for more
information on D8 flow codes and flow grids.

Figure 2-7: The Convert Flow Grid dialog.

Prepare Merge Files


This tool is for merging two or more files into a single file. Any set of RiverTools
Mask (*.rtm) files that index the same DEM grid file can be merged. A set of RiverTools Grid (*.rtg) files can be merged to create a RiverTools Sequence (*.rts) file.
You can also merge a set of RiverTools linkfiles (*_links.rtv) or a set of RiverTools

The Prepare Menu

RiverTools Users Guide

Chapter 2: How to Use the RiverTools Dialogs

91

streamfiles (*_streams.rtv) that correspond to different basins in the same DEM.


Each of these basins will have its own basin prefix. It does not make sense to merge
a linkfile and a streamfile, or to merge two linkfiles or streamfiles that are associated
with different DEMs.
The new filename should have the same prefix and extension as the files that are
merged, such as .rtm, _links.rtv, _streams.rtv or .txt. Otherwise, it may not
be recognized and will not appear in droplists of available files. For link and stream
files, it is helpful to use a new basin prefix.
You can also use this dialog to concatenate a set of text files. In this case, the order of
the files matters and will be the same as shown in the list.
The buttons on the right apply to the highlighted file in the list on the left. Use the
Add and Remove buttons to add or remove files from the list. Edit the filename filter
to restrict the set of files that appear in the file selection dialog.
When you have finished adding files to the list, click on the Start button to begin the
merge operation.

Prepare Replace Bad Values


This dialog allows you to replace bad values (nodata and/or NaN - Not a Number)
in an input grid with an average of all valid neighbor values. It works best when the
bad values occur along lines or in pits. Bad values in a DEM can occur when mosaicking several component DEMs that do no fit together properly. This can be due to
errors in the component DEMs or in the software that was used to create the mosaic.

Prepare Replace Values


This dialog allows you to replace an old value in an input grid file with a new
value to create an output grid file. The input grid file can have any data type but it
must conform to the simple RTG (RiverTools Grid) format, which is described in
Appendix A: RiverTools Files and Formats, in the Users Guide. The output grid will
have the same dimensions and data type as the input grid. The string NaN can be
entered for either the old of new value and will be processed appropriately. NaN
stands for Not a Number and is an IEEE standard for the float point data types of
FLOAT (4-byte) and DOUBLE (8-byte).

RiverTools Users Guide

The Prepare Menu

92

Chapter 2: How to Use the RiverTools Dialogs

Prepare Gzip File


This dialog allows you to compress any file using the well-known GZIP algorithm.
Filenames for gzipped files should end in .gz. Compressed files take up less hard
disk space and take less time to transfer over a network. They must be uncompressed, however, before use.

Prepare Ungzip File


This dialog allows you to uncompress any file that has been compressed with the
well-known GZIP algorithm. Filenames for gzipped files should end in .gz. Compressed files take up less hard disk space and take less time to transfer over a network. They must be uncompressed, however, before use.

Prepare Patch RTG DEMs


This tool is for patching together or mosaicking RiverTools DEM grid files. DEMs
must be imported via the File Import DEM dialog before they can be mosaicked
with this tool. The buttons on the right apply to the highlighted DEM grid file in the
list on the left. Use the Add and Remove buttons to add and remove DEMs from the
list. You can also preview a shaded relief image of the DEM (scaled to fit the screen)
with the Preview button, and view or edit an RTI file for the DEM by pressing the
View Infofile button.
When you have finished adding DEMs to the list, click on the Start button. RiverTools will check to see if there is an RTI for each of the DEMs in the list, and will
return with an error dialog it there isnt. Accurate bounding box information in the
RTI files is needed to figure out how the DEMs fit together. If everything is okay, a
shaded relief preview image is displayed that shows reduced-size mock-ups of the
DEMs in the list and how they all fit together. Pixels with values below the NODATA
threshold (see File Set Preferences) are shown in white. Missing tiles or gaps
that are not spanned by the DEMs in the list are assigned the NODATA value you
have indicated in your Preferences.
Click the left mouse button and drag inside the Patching Preview Window to select
the region for which you want to create a new DEM (via a rubber band box). Information about the selected region is printed in the output log. This includes bounding
box information and the number of rows and columns of the selected region. You can
select the entire window by clicking the right mouse button. This is the default selection.

The Prepare Menu

RiverTools Users Guide

Chapter 2: How to Use the RiverTools Dialogs

93

Finally, click on the Save New DEM button to create the new DEM and a descriptive
RTI file. If the window size is so large that the button is not visible, select Options
Save New DEM in the upper left corner of the Patching Preview Window. The
Options menu also lets you (1) label each component DEM with its filename,

Figure 2-8: The Patch RTG DEMs dialog.


(2) change the color used for the rubber-band box and labels, (3) burn in lines, (4)
save the image to a file, and (5) get mouse button help
Note
RiverTools reads the necessary portions from the component DEM files in order to
create the new DEM. This is done in such a way that there is no problem if the size
of the new DEM exceeds the amount of RAM that is available on your computer.

Prepare USGS 1-Degree DEMs USGS Map Info


This dialog displays a searchable lookup table of lat/lon codes and the corresponding USGS 1:250,000 scale map/DEM names. The lat/lon codes are 5-digit numbers,
such that the first two digits are the latitude and the last 3 digits are the longitude of
the southeast corner of a 1 degree by 1 degree cell in the United States. (2-digit longi-

RiverTools Users Guide

The Prepare Menu

94

Chapter 2: How to Use the RiverTools Dialogs

tudes are padded with a preceding zero.) This lookup table is useful because although
it is easy to determine the bounding latitudes and longitudes for a region of interest
from a map, you must know the USGS names for the 1-degree DEMs that cover a
region before you can download them (or otherwise obtain them) from the USGS
EROS Data Center. Note that USGS 1:250,000 scale maps span 2 degrees longitude
by 1 degree latitude and thus cover the same region as two USGS 1-degree DEMs,
side by side. This is reflected by a suffix of _E or _W (for east and west) at the end
of the USGS 1-degree DEM names. This lookup table contains almost 1000 entries.

Prepare USGS 1-Degree DEMs Make RTI Files


You do not need to use this dialog if you have imported one or more USGS 1-Degree
DEMs with the File Import DEM dialog. The purpose of this dialog is to quickly
create RTI files for a set of USGS 1-Degree DEMs that have been:
(1) converted to flat binary, row-major format, and
(2) given filenames with a 5-digit lat/lon prefix.
Some vendors re-distribute USGS 1-Degree DEMs in this format on CDs. Conversion to this format can also be done as a batch process by using wildcards in the Prepare Convert Grid dialog.
Filenames must consist of a 5-digit lat/lon prefix. Bounding box info can then be
determined from the filenames. All other geocoding info for these DEMs can then be
determined automatically, even for DEMs in Alaska. Lats and lons in this dialog refer
to southeast corners.
RTI filenames will have the same prefixes and end in .rti. Once RTI files have been
created for a set of 1-Degree DEMs, they can easily be mosaicked with the Prepare
Patch RTG DEMs dialog.

The Prepare Menu

RiverTools Users Guide

Chapter 2: How to Use the RiverTools Dialogs

95

The Extract Menu


Although every effort has been made to make each routine in the Extract menu as
efficient as possible, some of them may still take a while to complete their calculations. During this time your computer may be unresponsive. It is difficult to accurately predict the length of time these routines will take, since it depends on various
attributes of the DEM and various attributes of your computer. Each routine in the
Extract menu produces one or more files (using a DEM or previously extracted files)
that contain extracted information. Once these files have been extracted, subsequent
display and analysis routines are able to run very quickly.
Note
The numbers in front of the first four routines in this menu are meant to indicate
that you should run them in this order. Dependencies on previously extracted files
are often indicated by order of appearance in the Extract menu.

Extract 1. Flow Grid (D8)


This routine uses a DEM to generate several additional files that are needed to delineate watersheds and extract information for a river network. The two major tasks are
to create a depressionless DEM and to create a D8 flow grid. A robust algorithm for
creating a D8 flow grid must be able to handle many ambiguous situations that arise
due to limited vertical and horizontal resolution in the DEM.
Note
Although these routines are efficient they are computationally intensive and may
take several hours for very large DEMs. Your computer may be unresponsive during this time.
Create a depressionless DEM file from your original DEM file.
In order to create a D8 flow grid, RiverTools first creates a depressionless DEM from
your original DEM. It assumes that there are two copies of your original DEM grid
file in the current directory, a raw version which is to be left unaltered, and another
version in which the depressions are to be filled. These two RTG files typically have
the filename extensions _rawDEM.rtg and _DEM.rtg.
You can specify a threshold so that pixels in the DEM with values less than or equal
to this threshold will be ignored. These pixels will be assigned a flow code of zero in
the D8 flow grid, which indicates an undefined flow direction. This feature can be
RiverTools Users Guide

The Extract Menu

96

Chapter 2: How to Use the RiverTools Dialogs

useful when creating a flow grid for a DEM that borders a large body of water. For
example, you would enter a value of zero when creating a flow grid for the Hawaiian
island of Oahu.
You can also specify depressions that are not to be filled by temporarily changing the
value of any pixel in the depression to the value of the Closed basin elevation code.
You can change the values with the Value Zoom tool in the Tools menu of a Display
window.
Create a RiverTools D8 flow grid file.
The depressionless DEM is used to create this RTG file, which will have the filename
extension _flow.rtg. The flow grid will have the same dimensions as the DEM.
Each 1-byte element in the flow grid will contain a flow code which indicates the
direction in which water would flow away from the corresponding pixel in the DEM.
RiverTools is able to extract a wealth of information from flow grids and many routines rely on the existence of this grid file. See the Glossary for more information on
flow grids.
Flats are pixels that do not have a neighbor pixel with a lower elevation. There are
three different options for resolving flow direction in flats. Iterative linking is a
robust algorithm, but can produce parallel flow lines within broad flat valleys.
Imposed gradients is the method proposed by Garbrecht and Martz (1997) which
attempts to center flow within flat valleys and reduces parallel flow. Imposed gradients plus is a new extension of the imposed gradients method which further refines
flow within flats to eliminate virtually all parallel flow. The latter two methods are
slower but yield better results when flats are an issue.
Create RTM files for the original and filled depressions in the DEM.
The standard extensions for these RiverTools Mask (RTM) files are _mins.rtm and
_pits.rtm. The mins mask shows local minima in the DEM and the pits mask
shows the set of pixels that were raised in order to create the depressionless DEM.
These and other RTM files can be viewed as images via the Display Masked
Region dialog. They can also be exported as ESRI shapefiles via the File Export
Vector Boundaries dialog.
Create an RTG file which shows the minima and their basins.
This file will have the compound extension _TMPmask.rtg and shows the minima
and the complete set of pixels in the DEM that drain to each minima prior to depression filling. This grid can be viewed with the Display Density Plot dialog as follows. Select the grids filename from the list in the dialog, click on the Yes button
next to the question Is this a mask?, and click on the Cycle the plotting colors but-

The Extract Menu

RiverTools Users Guide

Chapter 2: How to Use the RiverTools Dialogs

97

ton. The white pixels in this image are the local minima. The menu bar at the top of
the window will have a Tools menu which has several tools (like Value Zoom) that
can be used to get quantitative information for the minima.

Extract 2. Basin Outlet


This is a graphical routine that allows you to specify the basin that you want to analyze by providing RiverTools with the precise location of the basins outlet. First, you
should enter the basin prefix that you wish to use as an identifier for this basin and
files that are associated with this basin. This prefix will be used in building filenames
for several RiverTools files that you will usually create later on with other tools in the
Extract menu. Next, click the Backdrop button to display a shaded aspect plot
which will serve as a backdrop for your selection. Now click on a pixel in this backdrop image. The flow path from this pixel to the edge of the DEM (or a nodata value)
will be drawn in white. You can find out how water flows off of the landscape represented by your DEM by clicking on different points.
Once you are certain that the flow path on the screen originates in the basin you want
to analyze, you can use the Basin Outlet Adjuster (a slider) to select a particular
DEM pixel along this flow path. The currently selected pixel is indicated by the
red/white interface on this path, and the precise coordinates of this pixel are printed in
the output log of the RiverTools main window. Once you have chosen the outlet you
want in this way, you must save its location by clicking on the Save Outlet button.
This outlet can then be used by subsequent routines like Extract RT Treefile.
If you now select View Basin Info from the File menu, you will see that this outlet
information has been saved in a basin info file. Additional information about this
basin will be written to this file later on by other routines in the Extract menu. These
routines will also access the outlet information contained in this file, which has the
extension _basin.txt.

Extract 3. RT Treefile
This routine creates a RiverTools treefile from a RiverTools D8 flow grid. The treefile is a vector-formatted file with the extension _tree.rtv, while the flow grid is a
raster-formatted file with the extension _flow.rtg.
You can create a treefile using either:
1. A single outlet pixel that you previously selected and saved via the Extract
Basin Outlet dialog.
2. All pixels that have a flow code of zero as basin outlets, which includes the four
edges of the DEM and the nodata pixels in the DEM.

RiverTools Users Guide

The Extract Menu

98

Chapter 2: How to Use the RiverTools Dialogs

3. A set of pixels whose coordinates are listed as two columns in a text file.
4. A set of pixels that have been saved in a RiverTools Mask (RTM) file. In this
case, only the pixels on the boundary of the masked region are used. This option
allows you to extract the set of rivers that drain to a features such as a lake. An
RTM file for a lake can be made with the Extract Mask Connected-toSeed Mask dialog.
A treefile can store data for a single basin (as in the first option) or many disjoint subbasins. Every pixel in a particular basin is the outlet pixel for a subbasin that is contained in this basin. Each of these subbasins has many attributes, such as contributing
area and relief. A RiverTools treefile stores all of these attributes (in a compact way)
for all of the pixels/subbasins in a given basin.

Extract 4. River Network


This routine uses a RiverTools treefile with extension _tree.rtv to create several
other auxilliary files, based on the pruning method and threshold that you choose. If
you choose Specified grid file from the Prune by droplist, then you use any RTG
(RiverTools Grid) file for pruning. For example, you can create a grid that is some
function of slope, area and/or curvature with the Extract Derived Grid Grid
Calculator dialog and enter its name here.
Two vector files will be created, a linkfile (*_links.rtv) that stores attributes for
every channel link in the river network, and a streamfile (*_streams.rtv) that stores
attributes for every Horton-Strahler stream in the river network. A small binary file
with extension _stats.dat is also created that contains summary information for
Horton-Strahler streams. These files are needed by several of the routines in the Display and Analyze menus.
Several text files are also created that contain summary information. These files have
the extensions _table.txt, _ratios.txt and _gen.txt. You can view the information in these files via several dialogs in the Analyze Strahler Streams submenu,
such as Data Summary, Stream Ratios, and Side Trib. Matrix. See Appendix B,
the RiverTools Glossary for definitions of any unfamiliar terms.
There is no universal agreement as to how the heads of first-order channels (known
as sources) can best be identified from a DEM and/or a flow grid. This is still an
active area of research that RiverTools may help to resolve. However, many different
approaches have been proposed and are in common use. (See the sections called
Extracting Drainage Networks from DEMs on page 40 and Recommended Reading on page 64 in Chapter 1 for more information.) In RiverTools, these are referred
to as pruning methods, and you are offered a variety of choices. Most pruning methods require the specification of a threshold, with the idea that channelized flow does
The Extract Menu

RiverTools Users Guide

Chapter 2: How to Use the RiverTools Dialogs

99

not usually occur below this threshold. One approach to determining thresholds is to
look for a peak in a plot of channel slope vs. drainage area. Although this peak is usually not well-defined, you can create such a plot by clicking on the Create X vs. Y
Plot button in this dialog. The path to the X vs. Y Plot dialog is Analyze Basin
Pixels X vs. Y Plot. For more information on this dialog, go to the section of this
chapter called The Analyze Menu on page 122.

Extract D8-based Grid Upstream Areas


Every pixel in a DEM is the outlet of some drainage basin and hence has a contributing area. This routine creates an area grid that contains the contributing area for
every pixel in the DEM. A RiverTools D8 flow grid, which you can create via the
Extract Flow Grid dialog, is needed to create this area grid. The areas can be
returned as numbers of pixels or square kilometers. They are saved as either 4-byte
integer data or 4-byte floating point data. The latitude-dependence of pixel area for
pixels of the fixed-angle type is taken into account using the ellipsoid model that is
specified in the File Set Preferences dialog. You can view an area grid as an
image via the Display Density Plot dialog.
Note
Although RiverTools uses an efficient algorithm, computing area grids is computationally intensive and may take a while.

Extract D8-based Grid Flow Widths


This routine computes a grid of flow widths that can be used to compute specific
area, defined as the contributing area per unit length of contour line, from a D8 area
grid. For DEMs with fixed-length pixels with an xsize of dx and a ysize of dy, the
flow widths are (1) dx for pixels with flow toward the north or south, (2) dy for pixels
with flow toward the east or west, and (3) dd = sqrt(dx^2 + dy^2) for pixels with flow
toward the northeast, northwest, southeast or southwest. For DEMs with Geographic
coordinates (fixed-angle pixels), the latitude-dependence of pixel geometry is taken
into account. Choose units of meters or km and data type of FLOAT or DOUBLE.

Extract D8-based Grid Specific Areas


This routine computes a grid a specific areas, or contributing area per unit length of
contour line. A D8 area grid and D8 flow width grid are required as inputs, and the
area grid is assumed to have a data type of FLOAT (4 bytes per pixel). The specific
area grid will also have a data type of FLOAT. The flow width grid may have a data
type of FLOAT or DOUBLE (8 bytes per pixel).

RiverTools Users Guide

The Extract Menu

100

Chapter 2: How to Use the RiverTools Dialogs

Extract D8-based Grid Downstream Slopes


This routine creates a slope grid that contains the local slope in the direction of
flow for every pixel in a DEM. A RiverTools D8 flow grid, which you can create via
the Extract Flow Grid dialog, is needed to create this slope grid. Local slope is
defined as the difference in elevation between a pixel and the adjacent pixel in the
downhill direction of flow, divided by the distance between pixel centers. With this
definition, slopes are always nonnegative.
Slopes are returned as rise over run as opposed to an angle. A plane tilted at a 45
degree angle has a slope of 1.0, or tan(45). Slopes are dimensionless and are saved in
a binary RTG file as 4-byte floating point numbers. If you need to create a grid file
with slope angles, you can use the Extract Derived Grid Grid Calculator
dialog to create one as the arctangent of a slope grid. You can view a slope grid as an
image via the Display Density Plotroutine.
Note
In many contexts it makes more sense to work with channel slope as opposed to
local pixel slope. The Extract River Network routine automatically computes
and archives both along-channel and straight-line slopes for every link and every
Strahler stream in your river network. You can access this information from many
of the RiverTools dialogs, such as the File Export Vector dialog and many of
the dialogs in the Analyze Strahler Streams and Analyze Channel Links
submenus.

Extract D8-based Grid Downstream Curvatures


This routine computes local curvature along flow paths for every pixel in a DEM
grid, using a RiverTools D8 flow grid and a slope grid. Local curvature is defined as
the difference in slope between a pixel and the adjacent pixel in the direction of (D8based) flow, divided by the distance between the pixel centers. With this definition,
curvature is positive where a channel profile is concave up, and negative otherwise.
Local slope is the slope defined by a pixel and the adjacent pixel in the direction of
flow, as rise over run and is dimensionless. Curvatures have units of (1/km) and are
saved in a binary RTG file as 4-byte floating point numbers.
You can make grids for profile, plan, tangential, gaussian or mean curvature using the
quadratic-based, finite-difference algorithm introduced by Zevenbergen and Thorne
(1987) by making choices from the Extract Finite Difference Grid menu.

The Extract Menu

RiverTools Users Guide

Chapter 2: How to Use the RiverTools Dialogs

101

Extract D8-based Grid Flow Distance


This routine computes the along-channel flow distance to the set of pixels in a RiverTools Mask (RTM) file, for every pixel in a DEM. It uses a RiverTools D8 flow grid
and accounts for the latitude-dependence of pixel dimensions in fixed-angle DEMs
using the ellipsoid model indicated in the File Set Preferences dialog.
Many different kinds of RTM files can be created with dialogs in the Extract
Mask menu. If no RTM file is specified, then the distance is computed to either the
edge of the DEM or to the first nodata pixel encountered. Computed flow distances
have units of kilometers and are saved in a binary RTG file as 4-byte floating point
numbers. You can view a flow distance grid as an image via the Display Density
Plot dialog. (Be sure to try the Cycle plotting colors option.)
Note
Although RiverTools uses an efficient algorithm, computing flow distance grids is
computationally intensive and may take a while. Your computer may be unresponsive during this time.

Extract D8-based Grid Grid Increments


This routine computes an grid increment for every pixel in a raster DEM, using a
previously computed grid file. The increment for a pixel is computed by subtracting
its grid value from the grid value of the pixel that it drains towards. For example, D8
area increments are computed if the input grid is: [prefix]_area.rtg. Computed
values are saved in a binary file, with the same data type as the input grid. This more
general tool replaces the original Area Increments dialog.

Extract D8-based Grid Number of Kids


This routine creates a number of kids grid by counting the number of pixels (out of
the eight neighbor pixels) that flow toward any given pixel in a DEM grid. This routine uses a RiverTools D8 flow grid. Values are saved in a binary grid file as 1-byte
integers between 0 and 7.

Extract D8-based Grid Horton-Strahler Order


This routine creates a Horton-Strahler stream order grid from a RiverTools D8 flow
grid. Values are saved in a binary grid file as 1-byte integers. For more information
on the Horton-Strahler stream ordering concept, see the Glossary in Appendix B.

RiverTools Users Guide

The Extract Menu

102

Chapter 2: How to Use the RiverTools Dialogs

Extract D8-based Grid Watershed Subunits


This routine uses a RiverTools linkfile to create a RiverTools Grid (RTG) file that
masks the watershed subunits that contribute flow to the sides of interior links and
the the upstream ends of exterior links in a river network. Together, these subregions
form a hydrologic partition of a given drainage basin. RiverTools grid files can be
viewed with the Display Density Plot routine. Larger subunits can be created by
increasing the pruning threshold that is used to create the linkfile. You can create
linkfiles with different basin prefixes as explained in the tutorials.

Extract D8-based Grid Upstream Relief


This routine computes a RiverTools Grid (RTG) file of upstream relief values. A
pixels relief value is computed as the difference between the minimum and maximum elevations that occur in the watershed that contributes flow to that pixel. The
minimum elevation will always occur at the pixel itself, for a DEM with filled
depressions. The data type of the output grid file is the same as the data type of the
input (filled) DEM file.

Extract D8-based Grid Longest Channel Length


This routine computes a RiverTools Grid (RTG) file of longest channel lengths. A
pixels value is computed as the length of the longest channel that originates at a pixel
upstream of the pixel and ends at the pixel. The data type of the output grid file is
FLOAT (4 bytes per pixel).

Extract D8-based Grid Basin Averages


This routine computes areal basin averages of any gridded value in an RTG file, such
as elevation, relief, slope, or topographic index. That is, every pixel is assigned the
areal average of the values of all the pixels in the watershed that contributes flow to
it. This is useful for lumped hydrologic models and other applications. The following
formula is used:

1
V [ k ] = ------------
A[k ]

N[k ]

G [ n ]da [ n ]
n=1

where V[k] is the value at the kth pixel, A[k] is the contributing area for the kth pixel,
N[k] is the number of pixels in the watershed that contributes flow to the kth pixel,
G[n] is the grid value at the nth pixel in a watershed, and da[n] is the pixel area of the

The Extract Menu

RiverTools Users Guide

Chapter 2: How to Use the RiverTools Dialogs

103

nth pixel in a watershed. The latitude-dependence of pixel area is taken into account
for DEMs with fixed-angle pixel geometry. The data type of the output grid file will
be FLOAT or DOUBLE depending on the data type of the input grid file.

Extract D-Infinity Grid Flow Angles and Slopes


This routine computes a continuous flow angle grid using the D-infinity algorithm of
Tarboton (1997). This algorithm divides flow between one or two of pixel's neighbors, and is better-suited to modeling flow over divergent hillslopes than the D8 algorithm. The associated grid of slopes is also created, where slope is defined as rise
over run.
The D-infinity algorithm relies on a pre-existing D8 flow grid to assign a reasonable
flow angle in ambiguous situations. Flow angles are stored as floating point numbers
between 0 and 2 Pi, as measured counter-clockwise in radians from due east. Computed values are saved in a binary file as double precision floating point numbers (8
bytes per pixel).
This routine is computationally intensive and could take several hours for a very large
DEM. Your computer may be unresponsive during this time.

Extract D-Infinity Grid Upslope Areas


This routine computes a specific area grid from a continuous flow angle grid, using
the D-infinity algorithm of Tarboton (1997). This algorithm divides contributing area
between two neighbors, where one is in a cardinal direction and the other is in a diagonal direction. This method is better-suited to modeling flow over divergent hillslopes than the D8 algorithm, but is less accurate than the method used by the Extract
Mass Flux Upslope Areas dialog.
A D-infinity flow angle grid stores flow angles as floating point numbers between 0
and 2 Pi, as measured counter-clockwise in radians from due east. Computed values
are saved in a binary file as double precision floating point numbers (8 bytes per
pixel).
This routine is computationally intensive and could take several hours for a very large
DEM. Your computer may be unresponsive during this time.

Extract Mass Flux Grid Flow Angles


This routine computes a continuous flow angle grid using a new mass flux algorithm. First, continuous flow angles area computed for a grid in which each pixel has
been subdivided into four quarter pixels (QP). This quarter-pixel grid has twice the
dimensions of the DEM and is later used to compute upslope areas as accurately as

RiverTools Users Guide

The Extract Menu

104

Chapter 2: How to Use the RiverTools Dialogs

possible. A flow angle grid with the same dimensions as the DEM is then computed
by an averaging procedure. Ambiguous situations are resolved by using a D8 flow
grid.
Flow angles are stored as floating point numbers between 0 and 2 Pi, as measured
counter-clockwise in radians from due east. Computed values are saved in a binary
RTG file as double-precision floating point numbers (8 bytes per pixel).

Extract Mass Flux Grid Upslope Areas


This routine computes an upslope (or contributing) area grid using a new mass flux
algorithm. First, upslope areas are computed for a grid in which each pixel has been
subdivided into four quarter pixels (QP). This quarter-pixel grid has twice the dimensions of the DEM. An upslope area grid with the same dimensions as the DEM is then
computed by a mass balance procedure. This algorithm is more accurate than the DInfinity algorithm and also gives good results near peaks and drainage divides. Computed values are saved in a binary RTG file as double-precision floating point numbers (8 bytes per pixel).
This routine is computationally intensive and could take several hours for a very large
DEM. Your computer may be unresponsive during this time.

Extract Mass Flux Grid Upslope Specific Areas


This routine computes an upslope specific area grid using a new mass flux algorithm. Upslope areas are read from an input file and then divided by projected pixel
widths in order to compute specific areas. Specific area is the upslope area per unit
length of contour line. Computed values are saved in a binary RTG file as double-precision floating point numbers (8 bytes per pixel).

Extract Finite Difference Grid


This routine uses the method described by Zevenbergen and Thorne (1987) to compute morphometric parameters such as slope, aspect, derivatives and five different
types of curvature. This method fits a quadratic surface to the (3 x 3) neighborhood of
each pixel in the input DEM file.

Extract Derived Grid Grid Calculator


This dialog operates in much the same way as a scientific calculator, except that it
associates the variables X, Y and Z with 3 RTG (RiverTools Grid) files. You can
leave the Y and Z grid entries blank if you want to create a new grid from a single

The Extract Menu

RiverTools Users Guide

Chapter 2: How to Use the RiverTools Dialogs

105

input grid. You can choose the data type of the output grid from a droplist at the bottom. This much more general dialog replaces three older dialogs in this menu called:
Product of 2 Grids, Difference of 2 Grids and Area-Slope Power Law.
Example Applications
1. In the idealized case of unit excess rainrate, the product of a slope grid and a specific area grid is proportional to the flow or stream power per unit of contour line
length.
2. The depths of depressions in a DEM can be computed as the difference of the
filled DEM (*_DEM.rtg) and the original DEM (*_rawDEM.rtg).
3. A grid for pruning a flow grid to identify heads of channels (via the Extract
River Network dialog) can be computed from a slope and area grid as f =
(Slope^a) * (Area^b), where a and b are constants. Various topographic indices
can also be computed from slope, area and curvature grids.

Extract Derived Grid Topographic Index


A topographic index or steady-state wetness index can be defined for every pixel
in a DEM as: TI = log(A / S), where A is the contributing area for the pixel, S is the
local slope for the pixel (rise over run), and log refers to natural log. This index has
been found to be a useful indicator of the likelihood that the soil in a given pixel is
saturated. This routine creates a topographic index grid from a RiverTools area grid
and slope grid, which are assumed to exist already. The computed values are saved in
a binary RTG file as 4-byte floating point numbers. You can view this grid as an
image via the Display Density Plot routine. Note that multiplying A or S by a
constant would result in the same grid up to an additive constant.
Often, many of the pixels in a DEM are flats, which have a local slope of zero. The
topographic index for these pixels is undefined, and they are mapped to a value of
(minTI - 0.1).

Extract Derived Grid Restricted to RTM


This routine uses an input RiverTools Grid (RTG) and RiverTools Mask (RTM) file
to create a new RTG file such that pixels identified in the RTM file are assigned their
corresponding values in the input RTG file and the remaining pixels are assigned the
Outside mask value you specify. Using this dialog you can create a new DEM that is
restricted to pixels in a given basin. This new DEM can be used to create a shaded
relief image that only shows a particular basin. It can also be used in connection with
the Analyze Entire Grid Area-Altitude dialog.

RiverTools Users Guide

The Extract Menu

106

Chapter 2: How to Use the RiverTools Dialogs

There is also a Use complement of RTM? check box at the bottom that lets you
assign Outside mask value to pixels in the RTM mask, as opposed to outside of it.

Extract Mask Subbasin Mask


It is frequently useful to create and view a mask for the subbasins in a DEM that
match some selection criterion. This routine allows you to create such a mask for several types of subbasins and more options will be added in the future. Here main
basin refers to the basin which you identified when you selected an outlet via the
Extract Basin Outlet routine. The Basins draining to edge option creates a
mask by viewing every pixel on the four edges of the DEM as the outlet of a basin.
The Strahler subbasins option lets you mask subbasins according to Strahler order.
Once you have created a RiverTools Mask (RTM) file with this routine, you can view
an image of it via the Display Masked Region dialog.
Note
RiverTools Mask (RTM) files are not stored as grids and differ from the standard
type of mask in that only the IDs of the masked pixels are stored. This usually
requires much less file storage space. The pixel IDs are IDL array subscripts, which
are stored as long (4-byte) integers. An RTM file may contain these array subscripts
for one or more regions of interest (such as disjoint basins) in the associated DEM
grid. If there is more than one masked region or mask cell, then the value -1L
(long integer -1) is used as a delimiter between the subscripts of different mask
cells. The RTM file format is described in Appendex A, RiverTools Files and Formats.

Extract Mask Flat Mask


This routine creates a RiverTools Mask (RTM) file for the pixels in a DEM known as
flats. Flats are defined as pixels that have the same elevation as their lowest neighbor pixel. Note that a pixel can still be a flat even if some of its 8 neighbor pixels have
a higher elevation than it does. A total flat is a flat that has the same elevation as all
8 of its neighbors. RTM files can be viewed with the Display Masked Region routine.

Extract Mask Peak Mask (1 pixel)


This routine creates a RiverTools Mask (RTM) file for the pixels in a DEM known as
peaks. Peaks are defined here as single pixels that have a higher elevation than any
of their neighbor pixels. Note that multi-pixel peaks with the same elevation are
excluded. RTM files can be viewed with the Display Masked Region routine.

The Extract Menu

RiverTools Users Guide

Chapter 2: How to Use the RiverTools Dialogs

107

Extract Mask Ridge Mask


This routine creates a RiverTools Mask (RTM) file for the ridge pixels in a DEM.
Ridges are defined in a simple manner here as pixels that are higher in elevation than
six or more of their eight neighbor pixels. RTM files can be viewed with the Display
Masked Region routine.

Extract Mask Pit Mask (1 pixel)


This routine creates a RiverTools Mask (RTM) file for the pixels in a DEM known as
single-pixel pits. Single-pixel pits are pixels that have a lower elevation than any of
their 8 neighbor pixels. RTM files can be viewed with the Display Masked
Region routine.

Extract Mask Grid Threshold Mask


This routine creates a RiverTools Mask (RTM) file for the pixels in a binary RTG file
that lie in a user-specified range. RTM files can be viewed with the Display
Masked Region dialog.

Extract Mask Land Mask


This routine creates a RiverTools Mask (RTM) file for all pixels in the DEM that are
above sea-level (i.e. have an elevation greater than zero).

Extract Mask Ocean Mask


This routine creates a RiverTools Mask (RTM) file for all pixels in the DEM that are
at or below sea-level (i.e. have an elevation less than or equal to zero). Pixels with
Nodata or NaN (Not a Number) values can also be included in the ocean mask by
clicking on the check box.

Extract Function Width Function


This routine computes the width function associated with a previously extracted river
network and saves it to a file as plain ASCII text. The width function gives the number of channel links as a function of distance (in kilometers) from the outlet of the
river network. It is closely related to the instantaneous unit hydrograph or IUH. The
width function can be viewed with the Analyze Channel Links Width Function dialog or with the Display Function dialog.

RiverTools Users Guide

The Extract Menu

108

Chapter 2: How to Use the RiverTools Dialogs

Extract Function Area-Distance Function


This routine computes the area-distance function that is associated with a previously
extracted river network and saves it to a file as plain ASCII text. The area-distance
function gives the drainage area (in square kilometers) of all the pixels that are at a
given flow distance (in kilometers) from the basin outlet. The area-distance function
can be viewed with the Analyze Basin Pixels Area-Distance Function dialog
or with the Display Function dialog.

Extract Data from RTV File


This routine allows you to export attributes of channel links or Strahler streams that
have been computed by RiverTools to a plain text file. If you select both a first and
second field, then these values will be listed in two columns, or one pair of values per
line. Additional descriptive info will be included as a header. You can also filter the
data by Strahler order. The newer File Export Vector dialog is a more powerful
tool that provides similar functionality.

Extract Grid from Treefile


This routine allows you to export vector data for the currently selected basin as a raster RiverTools grid file, in which pixels in the basin receive their measured values
and pixels outside of the basin receive a nodata value of -1. The effect is to mask out
nonbasin pixels in an ordinary RiverTools Grid (RTG) file.

The Extract Menu

RiverTools Users Guide

Chapter 2: How to Use the RiverTools Dialogs

109

Figure 2-9: Export Vector Dialogs.

RiverTools Users Guide

The Extract Menu

110

Chapter 2: How to Use the RiverTools Dialogs

The Display Menu


The Display menu contains a variety of different dialogs that you can use to create
color images. In addition to explaining how to use these dialogs, this section provides
a number of suggestions for how to create interesting images.
Note that many of the graphics windows that are created by these dialogs have a
menu bar across the top, with menus called: Options, Tools, and Info. The Tools
menu contains a variety of tools that you can use to interact with that window. These
tools are explained in the section Interacting with an Image on page 47. The
Options menu can be used to print the image to a printer or a file, or save it as an
image file.
The Display Map Projection Info dialog is explained at the end of this section
and can be used to display most of the images in the Display menu with different
map projections. By default, images are displayed without using a map projection.
When the map projection is set to None windows can be resized by integer factors
and the interactive tools in the Tools menu are available. You can dynamically resize
any window by clicking on a corner and dragging with the mouse.

Display Density Plot


This dialog is used to create a density plot for a RiverTools Grid (RTG) file. A density plot is a color-by-number plot, where each value or range of values in the grid
is assigned a different color. At the top of the dialog there is a list of available RiverTools grids, as recognized by the extension .rtg and an appropriate filesize. Select a
grid from this list. Just below this list is a list of all the IDL color tables. You can preview these different color tables with the File Set Colors dialog.
Several different color assignment methods are provided in the droplist at the bottom
of the dialog. The default is a somewhat harsh stretch known as a histogram equalization of equal-area stretch. Note that a Custom power law stretch is provided
toward the bottom of the droplist, as well as a Cycle plotting colors option. This
option can produce some very interesting effects, especially for flow distance grids. It
is also useful for viewing long-integer mask files that have been saved as RTG grid
files, since it causes every mask cell to be displayed with a different color. The RiverTools plotting colors can be viewed with the File Set Colors dialog.

The Display Menu

RiverTools Users Guide

Chapter 2: How to Use the RiverTools Dialogs

111

Figure 2-10: Density Plot for Beaver Creek, Kentucky DEM.

Display Contour Plot


This dialog is used to create a contour plot for your DEM. The Minimum contour
elevation in the text box at the top is used as the elevation of the first contour line.
Enter the contour interval you want in the Contour interval text box. This interval is
initially set to a reasonable default value. The minimum and maximum elevation are
shown for information purposes only and cannot be modified with this dialog. If you

RiverTools Users Guide

The Display Menu

112

Chapter 2: How to Use the RiverTools Dialogs

click on Yes beside the Cycle fill between contours? question, then the gaps
between successive contour lines are filled with solid colors. By default successive
gaps are colored black and white.
You can customize the way the contour plot is drawn by clicking on the Change Line
Colors/Widths >> button to open another dialog. The other dialog allows you to
change the attributes of any individual contour line. There is also a Change Several
button in the Options menu of this dialog with a drop-down menu of options for
changing the attributes of several contour lines at once. For example, try choosing
Rainbow colors from this menu to create a multi-colored contour plot.
You can create a layered contour plot by selecting Display Multi-Layer Plotand
then using the Display Contour Plottwice. Use filled contours with colored fill
for the raster layer, and then use standard contours (perhaps black, with labels) for the
vector layer.

Display Surface Plot


This dialog is for creating a surface plot for the currently selected DEM. A surface
plot shows a 3D perspective view of what the land surface described by the DEM
would look like when viewed from different directions. The position of the observer
is specified in the top two text boxes via a compass angle and a zenith angle. The
compass angle is an angle in the xy plane measured counter-clockwise from due east,
like you learned in high-school trigonometry. The zenith angle is the angle between
the zenith direction of straight up (away from the center of the earth) and the vector
that points from the point being viewed to the observer. Both angles are specified in
degrees.
If you answer Yes for the Shade by elevation? question, then the surface will be
shaded or colored by scaling the current Density plot color table to the range of elevations in the DEM. You can change the background color with the File Set Colors
tool. Black and white are both good background colors.
Sometimes wire-mesh surface plots look better if you show only the horizontal lines
of the mesh, so this option is available. You also have the option of not showing the
axes in the image.
Since surface plots for highly detailed topography take a long time to generate and
arent very attractive, RiverTools automatically applies a reduction factor to your
DEM before creating the plot, so that the resulting size will not be greater than 100
pixels on a side. You may want to enter a different value for this reduction factor.
Smaller reduction factors often work well for regions with fairly smooth topography.

The Display Menu

RiverTools Users Guide

Chapter 2: How to Use the RiverTools Dialogs

113

You can choose from three different Surface types in the droplist at the bottom of
the dialog. These are Wire mesh, Lego and Shaded.
Note
You can also create surface plots for subregions in your DEM with the Surface
Zoom window tool. Many image windows have a menu bar along the top edge with
a Tools menu, and the Surface Zoom tool is in this menu.

Figure 2-11: Surface plot created with the Surface Zoom window tool.

RiverTools Users Guide

The Display Menu

114

Chapter 2: How to Use the RiverTools Dialogs

Display Shaded Relief


This dialog creates a shaded relief image for the currently selected DEM. First, each
pixel is assigned a color based on its elevation. You can use the special default color
table for this initial assignment, or you can select Options >> IDL colors for
relief? Yes in the File Set Colors dialog to use the IDL color table that is currently selected in the File Set Colors dialog. (Color tables with the word rainbow in their name usually work well.) Next, the brightness of each pixel is
determined. The brightness value indicates how well a pixel is illuminated by a distant light source. It is computed as the dot product of a light source vector and the
pixels surface normal vector. The surface normal vector is locally perpendicular to
the surface, and the light source vector points from the pixel to the light source. (Both
are unit vectors.) This is a simple and standard lighting model known as Lambertian
shading.
You specify the position of the light source by entering a compass angle and a zenith
angle for it into the appropriate text box. These angles are explained in the previous
Display Surface Plot section, as well as in the Glossary.
If you want to add a certain level of ambient, non-directional light, you can enter a
value between zero and one in the Minimum brightness text box. You can also enter
a vertical exaggeration factor to increase shadowing and bring out fine details in the
topography. An interesting effect can be produced by entering a negative number into
this box, which changes highs to lows and vice versa. This can make it easier to see
the shape of valley bottoms, for example.
If you want to create a density plot showing the brightness values only, click on the
Brightness matrix button. The brightness values, which range from 0 to 1, will be
scaled and displayed using the IDL color table that is currently selected in the File
Set Colors dialog. The gray-scale color table that appears first in the list is often a
good choice for displaying the brightness matrix. These images also print nicely.
Click on Yes next to the Blue flats? question to color pixels blue if they have vertical surface normals. Note that since surface normals are determined from a locally
fitted plane, these flats may not be true flats as defined in the Glossary. Click Yes
next to the White peaks? question to use white as the highest color in the
unshaded color table. This simulates snow on mountain peaks and can make it easier to identify the regions where the elevation is highest.

The Display Menu

RiverTools Users Guide

Chapter 2: How to Use the RiverTools Dialogs

115

Display Shaded Aspect


This dialog creates a shaded aspect image using a RiverTools flow grid and a userselected lighting direction. The default color scheme for these plots consists of shades
of green, but several other color schemes are available in a droplist in the File Set
Colors dialog.

Display River Network


This dialog creates a vector-drawn map of a river network that has been extracted
with the first four routines in the Extract menu. You can use either a RiverTools
linkfile or treefile to create this plot, and this dialog lets you choose from a list of
those that are available for the current data set. If you use a linkfile to create the plot,
then every channel link (between confluences) in the river network will be plotted as
a straight line, without showing any of the wiggles that may be resolveable in that
channel segment.
If you want to create a plot that shows every twist and turn in the river network,
choose a treefile from the list of choices. Treefiles are RiverTools Vector (RTV)
files with the extension _tree.rtv. It is important to realize, however, that the treefile
has a channel segment for every pixel in the basin, which means that channels will be
drawn even for the pixels that are on hillslopes unless you prune away or hide some
of these channels. For a small DEM (such as the one in the RiverTools sample data
set in a folder called Small, in the basins folder) a treefile will make an interesting
and instructive plot. For larger DEMs, however, there is usually so much detail in one
of these plots that it doesnt display well on your screen. In this case, you can click on
the Change Line Colors/Widths >> button in the dialog to get a second dialog that
gives you greater control over the plot. You can set a different color and line width for
each Strahler order, and you can also hide Strahler streams below a certain order by
making a selection from the droplist at the top of the dialog or by setting the line
width to zero for any Strahler streams that you dont want to plot. This latter option
allows you to create a plot that shows only the Strahler streams of a given order, for
example. Note that with the Display Multi-Layer Plot dialog, you could overlay
a plot of these streams on a (raster) image that shows the basin interiors or boundaries
for basins of the same order.
Since river networks in RiverTools are vector-drawn, creating plots for large river
networks tends to take longer than other types of plots. This dialog allows you to stop
plotting by pressing any key on your keyboard. The plotting status is displayed in a
text box.

RiverTools Users Guide

The Display Menu

116

Chapter 2: How to Use the RiverTools Dialogs

The background color here is black by default, which usually makes the channels easier to see. Note, however, that if you are using a map projection to display the river
network, with options like black and white box axes around the border, then you will
need to change this to some other color, such as white, in order to see the axes. You
can change the map projection via the Display Map Projection Info dialog.
Another way to see where channels are located is to create a density plot of an
upstream area grid. You can create one of these grids from a RiverTools flow grid
via the Extract D8-based Grid Upstream Areas dialog.

Display Sources / Jcts


This dialog lets you create a plot showing the upstream endpoints or heads of all the
Strahler streams of a given Strahler order. The transition from hillslope to channel
occurs at points called sources, and these are also the heads of the order 1 Strahler
streams. The effectiveness of the pruning method that you chose in the Extract 4.
River Network dialog for identifying channel sources can be assessed visually by
overlaying this plot on other images like shaded relief and contour plots. This dialog
also lets you change the color, symbol, and symbol size used in the plot.

Display Masked Region


This dialog lets you create an image from a RiverTools Mask (RTM) file. Note that
RTM files are not grids, but instead store only pixel IDs to save disk space. See mask
in the Glossary for more details. A list of available mask files is shown at the top of
the dialog, and you have the option of creating a multi-colored image of the either the
interiors or boundaries of the individual mask cells. Examples of both are shown in
the following figure. Some RTM files are created automatically by the first four net-

The Display Menu

RiverTools Users Guide

Chapter 2: How to Use the RiverTools Dialogs

117

work extraction routines in the Extract menu, and others can be created with dialogs
in the Extract Mask submenu. These different mask types are explained in the
section of this chapter that tells how to use the dialogs in the Extract menu.

Figure 2-12: Order 3 basin mask, interiors and boundaries.

Display Function
This dialog allows you to plot a function saved as one or more columns of numbers in
a text file. There are several places in RiverTools where you can save a function or a
profile in this format. You may also wish to create your own functions with IDL.
Entries in a row can be separated by white space, tabs, commas, semicolons, or
colons. Null lines and any lines that do not contain enough columns are skipped.
If the data is preceded by several lines of header information, you can click on the
View File button to view the text file and count the number of header lines. You must
then enter this number in the text box that is labeled Lines to skip.

RiverTools Users Guide

The Display Menu

118

Chapter 2: How to Use the RiverTools Dialogs

Display Grid Sequence


This visualization tool allows you to plot the frames in an RTS (RiverTools
Sequence) file as an animation. The arrow buttons at the bottom allow you to view
frames one by one. You can also jump to a particular frame by typing its number
beside the Frame button and pressing Return on your keyboard or by clicking on the
Frame button. To show all frames as an animation, you specify a wait time between
frames, DT, and then click on the Start button. Additional options can be selected by
clicking on the options button and choosing from the menu.
RiverTools Sequence (RTS) files are a simple extension of the RTG file format that
allow a sequence of RTG files to be stored in a single file. That is, an RTS file is a
simple concatenation of RTG files that each have the same data type. The main purpose of this format is to provide support for landscape evolution models and spatially-distributed hydrologic models in the RiverTools environment. For example, a
landscape evolution model produces a sequence of DEMs, each of which represents
the topography of the landscape at a particular time in its evolution. Similarly, a spatially-distributed hydrologic model may produce a sequence of grids, each of which
shows how water depths are distributed spatially at a particular time during a storm.
One way to create an RTS file is to merge several RTG files with a data type of
FLOAT with the Prepare Merge Files dialog. The RTS file format is described in
Appendix A, RiverTools Files and Formats.

Display ESRI Shapefile


This dialog allows you to read information from an ESRI shapefile, plot the entities,
and display a table of associated attributes. You can include vector data from shapefiles in a multi-layer plot via the Display Multi-Layer Plot dialog. Point,
PolyLine, and Polygon vector layers are all supported. This dialog can be used to reimport and display RiverTools vector data after it has been exported to a shapefile via
the File Export Vector dialog.

Display DLG - SDTS


This dialog allows you to read and plot a USGS Digital Line Graph (DLG) in SDTS
format (Topological Vector Profile). The USGS currently distributes its high-resolution 1:24K DLGs free of charge in this newly mandated format on the Internet. The
older DLG-Optional format is not supported. You can include vector data from DLGs
in a multi-layer plot via the Display Multi-Layer Plot dialog. To do this, however, you must choose Clip to DEM bounds in the Display options droplist. You
may also need to specify an x-offset and y-offset in the text boxes provided due to
registration errors between DEMs an DLGs for the same 7.5-minute quad. For some

The Display Menu

RiverTools Users Guide

Chapter 2: How to Use the RiverTools Dialogs

119

quads in Kentucky, for example, you must enter an x-offset of 30 meters (1 pixel) and
a y-offset of 210 meters (7 pixels) in order to get the DLG to line up with the DEM
for the same quad. This is due to a bounding box problem with the source data.
By default, the coordinates of the DLGs own bounding box are used so that all data
in the DLG file is displayed. The Clip to user bounds option in the Display options
droplist lets you clip the vectors to any bounding box.

Display Multi-Layer Plot


This dialog is used to create multi-layer plots. Click on the Start button to begin the
plot. This will open a blank window. Without closing this dialog, display one raster
layer, if desired, in the window with one of these dialogs in the Display menu:

Density Plot,

Contour Plot (filled option),

Shaded Relief,

Shaded Aspect,

Masked Region (interiors)

Finally, overlay one or more vector layers with these dialogs in the Display menu:

Contour Plot (not filled)

River Network

Sources / Jcts.

Masked Region (boundaries)

ESRI Shapefile

DLG-SDTS

Always press the Done button when your multi-layer plot is finished. This will
return you to the normal single layer plot mode of operation. Using a window tool
before you press Done will also return you to this mode.
For step-by-step instructions on how to create a multi-layer plot, see Creating MultiLayer Plots in Chapter 1.

RiverTools Users Guide

The Display Menu

120

Chapter 2: How to Use the RiverTools Dialogs

Display Map Projection Info


Many DEMs have fixed-angle pixels, so that pixel geometry is defined in terms of
Geographic (lat/lon) coordinates and the bounding box is specified in decimal
degrees. For these DEMs, many of the plots that you create with dialogs in the Display menu can be displayed in different map projections. Geographic refers to an
ellipsoid-based, 3D coordinate system and not a map projection (2D). DEMs with
fixed-length pixel geometry are also common, but contain data that has already been
projected into the UTM (Universal Transverse Mercator) map projection. RiverTools
does not yet support reprojection of these UTM-based DEMs to other map projections and this functionality is unavailable in IDL.
You can select a map projection from the droplist of choices at the top of the dialog.
The default, None, simply maps each array element in the DEM to its own pixel on
the screen. For UTM-based DEMs, this is equivalent to the UTM map projection. For
Geographic DEMs, displaying the image in this way causes distances along the xaxis (east-west) to appear stretched relative to distances along the y-axis. For example, USGS 1-Degree DEMs have 3-arcsecond pixels, which results in a fixed y-size
of 92.6 meters and a variable x-size that is (92.6 x cos(latitude)). When these DEMs
are displayed in a one-to-one way, the resulting images can be misleading because
they appear wider than they would on a map or a globe.
Below the droplist of map projections there are check boxes that allow you to overlay
various lines on the map such as (1) grid lines of latitude and longitude, (2) black and
white alternating box-style axes along the edges, (3) coastlines of continents, (4)
major rivers, (5) boundaries of countries (as of 1993), and (6) boundaries of USA
states. These lines will be drawn using IDLs high resolution vector database.
At the bottom you can enter a different value for the spacing between lines of latitude
and longitude that are overlaid if you check either of the first two boxes. The default
values cause there to be six lines along each axis, but you may want to enter
rounder numbers.
To create the best-possible images of large DEMs, you may need to enter a lower
reduction factor in the text box shown at the bottom. However, this causes plotting to
take longer and your screen resolution may be less than the new resolution.
When the map projection is set to None, then you can resize images by integer factors by dragging on a corner. Integer rescaling is fast, prevents image distortion, and
works well with interactive window tools.

The Display Menu

RiverTools Users Guide

Chapter 2: How to Use the RiverTools Dialogs

121

When the map projection differs from None, you can resize display windows to
any size by dragging on a corner. However, the Tools menu which contains the interactive window tools will not be present in the windows title bar. Window tools like
Vector Zoom are only enabled when the map projection is set to None.

RiverTools Users Guide

The Display Menu

122

Chapter 2: How to Use the RiverTools Dialogs

The Analyze Menu


You can do many different kinds of quantitative analysis of river networks and digital
terrain with RiverTools. When you extract a river network from a DEM with the first
four routines in the Extract menu, RiverTools automatically computes and archives a
treasure trove of information for the extracted river network. It does this for three different kinds of object: basin pixels, channel links, and Strahler streams. These represent three different levels of detail. This information is stored in a set of three
RiverTools Vector (RTV) files that have the extensions _tree.rtv, _links.rtv and
_streams.rtv. These file formats are described in Appendix A, RiverTools Files and
Formats. Notice that the first three entries in the Analyze menu are Strahler
Streams, Channel Links, and Basin Pixels and that each of these has its own submenu of dialogs that can be applied to the corresponding object.
For every basin pixel, the following attributes are measured and stored in the treefile:
Pixel ID, Parent pixel ID, Strahler order, Drainage area, Straight-line length, Alongchannel length, Elevation drop, Straight-line slope, and Along-channel slope. The x
and y coordinates are always computed from the pixel IDs.
For every channel link in the network, the following attributes are measured and
stored in the linkfile: Upstream end pixel ID, Downstream end pixel ID, Strahler
order, Drainage area, Straight-line length, Along-channel length, Elevation drop,
Straight-line slope, Along-channel slope, Total length, Shreve magnitude, Main channel length, Relief, Network diameter, Sinuosity, Drainage density, and Source density.
For every Strahler stream in the network, the following attributes are measured and
stored in the streamfile: Upstream end pixel ID, Downstream end pixel ID, Strahler
order, Drainage area, Straight-line length, Along-channel length, Elevation drop,
Straight-line slope, Along-channel slope, Total length, Shreve magnitude, Main channel length, Relief, Network diameter, Sinuosity, Drainage density, Source density,
Links per stream, Tribs of order (w-1), Tribs of order (w-2), and Tribs of order (w-3).
Note
All of the terms that appear here are defined in the Glossary.

The Analyze Menu

RiverTools Users Guide

Chapter 2: How to Use the RiverTools Dialogs

123

Note
Many of the dialogs in the Analyze menu display information in a plot. These plots
can be resized by dragging on a corner, and they can also be maximized to fill the
entire screen. When you print one of these plots, the aspect ratio on the printed page
will be the same as the aspect ratio of the graphics window.

Note
When drainage area is listed as an attribute for a channel link or Strahler stream, the
value refers to the entire contributing area above, but not including, the downstream
node of the link or Strahler stream. The downstream node is similarly used for
quantities like total channel length and main channel length.

Analyze Strahler Streams Data Summary


This dialog shows a summary of all the measurements for Strahler streams that are
archived in the streamfile (*_streams.rtv). The stream order is shown in the first column, and the number of streams of this order in the current streamfile is shown in the
second column. This number represents the sample size of the ensemble of order n
streams. The minimum, maximum, range (max - min), standard deviation and sample

RiverTools Users Guide

The Analyze Menu

124

Chapter 2: How to Use the RiverTools Dialogs

average for the ensemble are shown in the remaining columns. At the end of the table
there is also a summary of how the lengths of channel links vary with Horton-Strahler
order. Part of a data summary table is shown below.

Figure 2-13: Data summary for Strahler streams.

Analyze Strahler Streams Stream Ratios


This dialog shows a table of estimated Horton stream ratios for all of the measured
Horton-Strahler stream attributes. Notice that Horton stream ratios are determined by
fitting a least-squares regression line to points in a Horton plot (see Glossary for definition). Default choices are made in order to prepare this table, and these choices are
summarized at the bottom of the table. Since these choices affect the accuracy of the
computed stream ratios, it is a good idea to be skeptical of these values and to recompute them yourself with the Analyze Strahler Streams Horton Plots dialog.
By default, the data point for the order 1 streams is excluded from the regression
because order 1 streams are unique in the sense that they lie at the transition from
hillslopes to channels and hence may not be directly comparable with streams of
other orders. The data point for the highest order stream is also excluded by default
because (1) the highest order Strahler stream is often incomplete (see definition of
complete Strahler stream in the Glossary), and (2) unlike the other data points, which
represent averages for many Strahler streams, there is only one highest order stream.

The Analyze Menu

RiverTools Users Guide

Chapter 2: How to Use the RiverTools Dialogs

125

If you want to include these data points in the regression, you can do so via the Analyze Strahler Streams Horton Plots dialog. For a river network of order 7 or
higher, the exclusion of two points still leaves 5 points, which is reasonable. For
smaller river networks, however, it is difficult to accurately estimate Horton ratios
and the exclusion of two points may lead to a meaningless result.

Analyze Strahler Streams Horton Plots


This dialog lets you create a Horton plot for any of the Strahler stream attributes that
are measured by RiverTools. A standard Horton plot consists of a plot that has
Strahler order on the x-axis, and the log of the average of the given attribute (over all
streams/basins of the given Strahler order) on the y-axis. (Note that these averages
are listed in the rightmost column of the Analyze Strahler Streams Data
Summary table.) For almost any measured attribute, the data points on the Horton
plot tend to be fit very well by a straight line. This intriguing regularity was first
observed by Horton (1932, 1945), many different river network models have since
been proposed in an effort to explain and understand it. (See the references in the
Recommended Reading section at the end of this chapter.) It is now known to be a
consequence of self-similarity (on average) in the side tributary structure of the river
network tree and this self-similarity can be quantified via a side tributary matrix.
(This matrix is automatically computed by RiverTools and is explained later in this
section.)
The default X-axis choice is Strahler order, and this produces a standard Horton
plot. It is often interesting, however, to plot the Strahler stream average of one
attribute versus the Strahler stream average of another attribute. In this case, each
data point is still indexed by Strahler order, and the points still tend to fall on a
straight line. In RiverTools, this is called a generalized Horton plot.
If the Number of plots is set to one, then you can choose any single attribute for the
y-axis by checking the box next to it. If the number of plots is set to 4 or more, then
you need to check this number of boxes and separate plots for each will be displayed
together in an array. Click on the Clear Choices button to clear all of the y-axis
choices that are currently checked.
On a standard Horton plot, the log of an average is plotted on the y-axis. If you want
to see how a statistic other than the average varies with Strahler order, select a different statistic from the droplist.
There is a separate section of the dialog with the heading Regression:. This section
lets you control the regression analysis by choosing whether or not to fit lines to the
data points, whether or not to add a text inset to the plot, and the range of order values
to include in the regression. You can also explore three different schemes for per-

RiverTools Users Guide

The Analyze Menu

126

Chapter 2: How to Use the RiverTools Dialogs

forming a weighted regression. Choose Equal to assign an equal weight to each


point, or Sample Size to weight the points by the number of Strahler streams that
were used in computing the average value for the point, or Reverse Sample Size to
use the reverse of the Sample Size weights. Since the Horton stream ratio for the
given Strahler stream attribute is determined from the slope of the fitted line, these
options help you to asses the robustness of your stream ratio estimate.

Analyze Strahler Streams Stream CDFs


While Horton plots show how averages vary with Strahler order, this dialog produces
plots that show how entire sample distributions vary with Strahler order. It does this
by computing empirical cumulative distribution functions (ECDFs). See the Glossary for more information on CDFs.
Start by choosing a Measurement from the droplist. Next, choose a Scaling option.
The options are: No scaling, Divide data by mean, and Use stream ratios. The
default is Divide data by mean, which nondimensionalizes the data by dividing each
measurement by the sample average. The mean of the resulting distribution will be
one. The Use stream ratios option also nondimensionalizes the data by dividing each
measurement by a value, but in this case it uses the value that would be predicted for
the sample mean if a linear fit on a Horton plot were perfect. In this case the predicted
mean value varies with Strahler order according to an exponential formula as c*R(w1)
, where R is the stream ratio for the measurement and w is the Strahler order.
If the Number of plots is set to one, then the plot will consist of the empirical CDF
for the Strahler order that is checked in the Order choices section. If the Number of
plots is four or more, then you must check the corresponding number of Order
choices and multiple plots will be displayed in the same window. Click on the Clear
Orders button to uncheck all of the Order choices.
There is a separate section for performing and controlling a Kolmogorov-Smirnov
two-sample test. This is a nonparametric (or distribution free) statistical test that can
be used to test the hypothesis that two sets of measurements (which in this case are
nondimensionalized measurements for two different Strahler orders) are described by
the same cumulative distribution function. See Kolmogorov-Smirnov test in the
Glossary for more info. Try setting the Scaling option to Divide data by mean and
then answer Yes to the Perform K-S test? question. When you click on the Start button, the empirical CDF for the Strahler order that you have chosen to compare to
(order 2 by default) will be drawn in black and the empirical CDF for the other
Strahler order(s) will be drawn in red. You will find that the gap between the two
empirical CDFs is typically quite small. The Kolmogorov-Smirnov statistic quantifies this difference and is printed as <D> as an inset in the window. This similarity

The Analyze Menu

RiverTools Users Guide

Chapter 2: How to Use the RiverTools Dialogs

127

of distributions is evidence for statistical self-similarity, and is a feature of river network geometry that was first discovered with the use of RiverTools. This observation
has been explored and documented by Peckham (1995b).

Analyze Strahler Streams Histograms


This dialog is very similar to the dialog for Stream CDFs, but instead of empirical
CDFs, histograms are displayed. The Number of bins text box lets you control the
number of bins that are used to compute the histogram. The Scaling options are the
same as explained for the Stream CDF dialog, and the Number of plots also works in
the same way. Although the Kolmogorov-Smirnov test described in the last section
doesnt apply to histograms, this dialog lets you perform a graphical comparison of
nondimensionalized histograms. The histogram you are comparing to is drawn in red
and the other histogram is drawn in black.

Analyze Strahler Streams X vs. Y Plot


This dialog lets you explore how different measurements are correlated with one
another. It has been observed that strong correlations often exist between different
basin-scale measurements. When two measurements are highly correlated, it
becomes possible to use one measurement as a surrogate for another. This can be
quite useful when the second measurement is more difficult to measure. These types
of surrogate relationships are often used in surface water hydrology. For example,
drainage area (which can be extracted from a DEM) is often used as a surrogate for
discharge and other quantities. In theoretical work, the number of sources in the network is often assumed to be proportional to drainage area, and the ratio of these quantities (or constant of proportionality) is called the source density. Drainage density
is a similar quantity that gives the ratio of the total length of channels in a basin to the
drainage area of the basin, and this is often taken to be a constant.
Choose a measurement for the x-axis on the left-hand side of the dialog, and a measurement for the y-axis on the right-hand side. The min and max values are determined automatically, but you can override these if you want to zoom in on a
particular region of the plot. Since it is so common for two measured quantities to
have a power-law relationship to one another, logarithmic axes are used by default so
that the data points will plot approximately as a straight line. You can switch to linear
axes by clicking on No next to the Logarithmic? question.
If you want to apply boxcar-style smoothing to the data before plotting it, enter values in the Boxcar average width text boxes that are greater than the default of one.

RiverTools Users Guide

The Analyze Menu

128

Chapter 2: How to Use the RiverTools Dialogs

Finally, notice that there is a droplist in the lower left corner of the dialog that says
Data: next to it. This shows the kind of data object that is being used in the plot.
When you access the X vs. Y Plot dialog via Analyze Strahler Streams, this will
be set to Strahler streams by default.

Figure 2-14: The X vs. Y Plot dialog.

Analyze Strahler Streams Side Trib. Matrix


A side tributary matrix or generator matrix is a way to quantify the extent to
which a river network can be modeled or approximated as a self-similar or fractal tree
graph. The self-similar tree model is a very flexible and mathematically tractable
model that is capable of infinite variety. This model exhibits many of the observed
scaling properties of river networks, such as the well-known Hortons laws, and
offers a mathematical explanation for them in terms of self-similarity. (See Peckham
(1995a).) It has been found empirically, both in a limited number of map studies (performed by hand) and with RiverTools, that a special two-parameter subclass of the
class of self-similar trees (known as Tokunaga trees in honor of their discoverer)
provide a parsimonious model for the branching and side-tributary structure of river
networks. You can view an example of a self-similar tree graph by choosing SelfSimilar Tree from the User menu.

The Analyze Menu

RiverTools Users Guide

Chapter 2: How to Use the RiverTools Dialogs

129

The Extract River Network dialog computes the side tributary matrix for the
extracted river network and saves it in a text file with the extension _gen.txt. This
dialog lets you view the matrix that was computed.
The element at location (i,j) in this (lower triangular) matrix gives the average number of side tributaries of Strahler order j that enter a stream of order i from the sides.
This average is computed by looking at every Strahler stream of order i in the river
network, counting the number of side tributaries of order j that they all have, and then
dividing by the number of streams of order i. Since j ranges from (i-1) down to 1, the
upper half of the matrix is filled with zeros. (Note that the definition of Strahler order
requires that there be two upstream tributaries of order (k-1) at the upstream end of
every stream of order k, but says nothing about the side tributary structure.) Self-similar trees are defined as those whose side tributary matrix has constant values along
diagonals. Matrices with this kind of banded structure are known as Toeplitz matrices. The side tributary matrices for river networks are typically close to having this
Toeplitz property, except for some noise. Note that since there are fewer high order
Strahler streams, the values near the bottom of the matrix are known with less accuracy.

Analyze Channel Links Link CDFs


This dialog lets you explore a scaling property of the empirical CDFs (cumulative
distribution functions) of channel links. This scaling property is discussed by Rigon
et al. (1993). First, select a link attribute from the droplist of measurements. Then
choose the type of y-axis you want from the droplist of types. The first one, Prob(X
< x) shows an unscaled empirical CDF for the selected measurement, and the second
one, Prob(X > x) shows one minus the empirical CDF. The third one shows the log
of probability that measurement X exceeds some fixed value x. It has been observed
that Prob(X > x) grows as a power law, so taking logs results in straight line over
much of the range of values that is cut off at the upper end by a finite-sized scaling
effect. The dialog also lets you restrict the empirical CDF to links of a particular
Strahler order.
This scaling property is discussed by Rodriguez-Iturbe et al. (1992), Rigon et al.
(1993), de Vries et al. (1994), and Peckham (1995b, pp. 105-107).

Analyze Channel Links Link Conc. Fcn.


This dialog creates a plot that shows the number of channel links in each elevation
contour. You can change the number of contour intervals used in the plot by entering
a different number in the Number of bins text box. The link concentration function
was introduced and analyzed by Gupta and Waymire (1989).

RiverTools Users Guide

The Analyze Menu

130

Chapter 2: How to Use the RiverTools Dialogs

Analyze Channel Links X vs. Y Plot


This is the same dialog as the Analyze Strahler Streams X vs. Y Plot dialog,
except the default for the Data: droplist in the lower left corner is Channel Links
instead of Strahler Streams. Note that the window can be dynamically resized by
dragging on a corner; this is true for most of the windows that are created with dialogs in the Analyze menu.

Analyze Channel Links Width Function


This dialog displays the width function for a given river network, which shows the
number of channel links at each flow distance from the outlet. This function appears
to have been introduced by Kirkby (1976) and later independently by Gupta et al.
(1980). If you choose the Geometric option, this distance is measured in kilometers,
while if you choose Topologic the distance is measured in links. The value you enter
in the Number of bins text box determines the step size that is used along the x-axis.
The default value is the maximum height or diameter of the tree, as measured in
links. A summary of important properties is printed in the output log of the main window. This routine is very similar to the Analyze Basin Pixels Area-Distance
Function routine, except that it operates on the scale of channel links as opposed to
individual pixels.
While the width function can be computed very rapidly for moderate-sized river networks, it may take a while to compute it for large networks. Notice that the Extract
Function Width Function routine in the Extract menu can be used to compute a width function and then save it in a file as plain text.

Analyze Basin Pixels Area-Distance Function


This dialog lets you compute a function that (in RiverTools at least) is called the
area-distance function. First, the flow distance from the outlet to the basin pixel that
is at the greatest flow distance from the outlet is computed. This distance is divided
into a number of intervals that is determined by the value in the Bin size text box.
Pixels are placed into bins according to their flow distance to the basin outlet, and
then the total area occupied by the pixels in a given bin is summed. This area can be
returned in square kilometers or in pixels. In the case of the former, the latitudedependent pixel geometry is taken into account if the DEM has fixed-angle pixels.
Computing the area-distance function for a large river network may take a while.
Notice that the Extract Function Area-Distance Function dialog can be used
to compute an area-distance function and then save it in a file as plain text. For more
info, see the section that discusses that dialog.

The Analyze Menu

RiverTools Users Guide

Chapter 2: How to Use the RiverTools Dialogs

131

Analyze Basin Pixels X vs. Y Plot


This is the same dialog as the Analyze Strahler Streams X vs. Y Plot dialog,
except the default for the Data: droplist in the lower left corner is Basin Pixels
instead of Strahler Streams. Note that the window can be dynamically resized by
dragging on a corner; this is true for any RiverTools window.

Analyze Entire Grid Area-Altitude


This dialog computes and displays an area-altitude or hypsometric plot for a DEM.
You can choose to use either a depression-filled DEM that was created by the
Extract 1. Flow Grid (D8) dialog or your original raw DEM. You can also
choose between five different styles of area-altitude plot, which are (1) Pixels vs. altitude histogram (2) Area vs. altitude histogram, (3) Cumulative hypsometric curve,
(4) CDF-style hypsometric curve, and (5) Percentage hypsometric curve. Each of
these plots provides a different method for quantifying and visualizing the distribution of elevation values within a DEM.
The Area vs. altitude histogram is computed as follows. First, the minimum and
maximum elevations in the DEM are determined. This elevation range is then divided
into a number of intervals that is determined by the value in the Bin size text box.
Pixels are placed into bins according to their elevation above the basin outlet, and
then the number of pixels in each bin is displayed as a histogram.
The last two options are nondimensionalized curves that are useful for comparing
the topography of different regions. These two curves are equivalent up to a 90
degree rotation and a relabeling of one axis. The Percentage hypsometric curve has
been the subject of many classic papers. References for some of these can be found in
the Recommended Reading section of Chapter 1.
A summary of information about the elevations in the DEM is printed in the output
log window. This summary includes: (1) the minimum value (which could be a
nodata value like -9999), (2) the minimum positive value, (3) the maximum value, (4)
the mean (average) value, (5) the mode value (which is the value that occurs most frequently), and (6) the mode height (which is the number of pixels in the mode value
bin). If you choose either of the two hypsometric curve options, the hypsometric
integral is also computed and printed in the output log window. The hypsometric
integral is the area under the percentage hypsometric curve and above the CDF-style
hypsometric curve. Pixels in the DEM that have values less than the nodata threshold
(as indicated in the Preferences) are excluded from the analysis.

RiverTools Users Guide

The Analyze Menu

132

Chapter 2: How to Use the RiverTools Dialogs

The area-altitude plots of most DEMs have regularly spaced spikes that correspond to
the contour interval in the contour plot that was originally used to create the DEM.
The lower portion of the dialog gives you the option of trying to hide these spikes
so that you can better see the distribution of values. If you choose to hide the spikes,
you must try to determine the spike interval either from a visual inspection of the
plot or by trial and error. All bins that occur at this interval will be zeroed prior to creating the plot. You can also change the spike width, which has a default value of
one. This can be useful because spikes often spill over into several adjacent bins.
Please read the section called Top 10 Things You Should Know About DEMs on
page 28 for more information about spikes in DEMs.

Analyze Entire Grid Grid Histogram


This dialog can be used to examine the distribution of values within any RTG file.
Many dialogs in the Extract menu produce RTG files for measured quantities. The
Analyze Entire Grid Area-Altitude dialog offers similar functionality but
only applies to DEM grid files.

Analyze Subbasins Average Shape Data


The concept of basin shape can be quantified by computing a dimensionless number
called the shape factor. The shape factor is computed as the square root of the basin
area (as projected to the sky) divided by the basin diameter. The basin diameter is
computed as the maximum distance between any two points on the basin boundary.
For circles and squares this definition reduces to the familiar definition. A circle (or
circular disk) is the shape that has the highest possible shape factor. Skinnier shapes
have lower shape factors. Think of a sequence of ellipses that starts with a circle and
reduces to a line segment. Two geometrically similar shapes, regardless of their sizes,
will have the same shape factor.
There has been considerable debate in the literature over the years as to whether
basins tend to get more oblong or cigar-shaped with increasing size. It is very difficult and time-consuming to compute basin shape factors from maps, so this question
is often approached by measuring some surrogate quantity that is assumed to be proportional to the basin diameter. However, RiverTools uses very efficient algorithms
for computing shape factors which opens the way for intensive studies of basin shape.
If average basin shape does change with increasing basin size, then one would like to
known when this occurs, and whether geology or climatic factors have an influence.
It appears, however, that it is more common for the average basin shape factor in a
homogeneous region to remain essentially constant across scales. This is evidence for
yet another kind of similarity in the geometry of large river basins.

The Analyze Menu

RiverTools Users Guide

Chapter 2: How to Use the RiverTools Dialogs

133

This routine operates on a RiverTools Mask (RTM) file contains information for one
or more regions of interest, mask cells or shapes. You would typically use it
with an RTM file that you created using the Extract Mask Subbasin Mask
dialog. In this case, the RTM file would contain one or more basin shapes. However,
this dialog can also be used to examine other shapes, such as lakes or depressions in a
DEM.
Mask cells in the selected RTM file are read in and processed one at a time. Several
quantities are measured for each shape, including: (1) the basin area, (2) the area contained within the basins convex hull, (3) the ratio of the basin area to the convex hull
area, (4) the basin diameter (in kilometers), (5) the basin shape factor, and (6) the
shape factor of the basins convex hull. (See the Glossary for definitions.) The measured values for each shape are reported in the output log of the main window. The
average values for all of the subbasins in the mask are printed at the end of processing. Comparing the average values for the subbasins of one Strahler order to the average values of other Strahler orders is one way to address the question of trends in
basin shape. See the following discussion of the Analyze Subbasins Shape
Plots dialog.

Analyze Subbasins Shape Plots


Much of the discussion of the preceding dialog also applies to this one. However, this
dialog creates plots that show each shape and its convex hull. It also connects the two
points on the basin boundary that are furthest apart with a red line; this gives you a
visual representation of the basin diameter.
You begin by selecting a RiverTools Mask (RTM) file with a file selection dialog. If
present, you might select an RTM file with the extension _o3basins.rtm. RTM files
for subbasins can be created with the Extract Mask Subbasin Mask dialog.
Next, you should click on the Plot All Cells with Labels button. This will create an
image from the RTM file that shows each shape (e.g. basin) with a different color and
number. To get information on a particular shape, enter its number into the Show
mask cell number text box and click on the Start button. The selected shape and its
convex hull will be displayed in a new window and information for the shape will be
printed to the output log window. Lengths and areas printed here take the latitudedependence of pixel dimensions into account using the ellipsoid model that is indicated in the File Set Preferences dialog. You can also step sequentially through
the shapes in the RTM file by clicking on the arrow buttons.
In the lower right corner of the dialog you will see two display options. The second
option lets you view all of the shape plots, one-by-one, as a slide show. The default
waiting time between each plot is 0.0 seconds, which allows you to see how quickly

RiverTools Users Guide

The Analyze Menu

134

Chapter 2: How to Use the RiverTools Dialogs

RiverTools is able to compute all of the information. This option can also help you to
visually assess variations in shape. If your RTM file contains a large number of
shapes, you may want to quit before all of them have been displayed. The current
plotting status is shown in the upper right corner of the dialog, and you can press any
key to stop plotting.
If you examine the axis labels of these plots you will see that the basin shape is drawn
in the smallest square region that contains it. The distance along each axis is given in
pixels. If your DEM has fixed-angle pixel geometry, then these plots will be somewhat misleading because the basin will appear to be wider in the x-direction than it
really is relative to the y-direction. To see the actual geometry of a basin shape, you
must do the following: (1) Use the Display Map Projection Info dialog to set the
map projection to something like Cylindrical. You may also want to check the boxes
for showing grid lines and box-style axes. (2) Use the Display Masked Region
dialog to create an image that shows all of the shapes in your RTM file. This image
will show a close approximation to the true dimensions of the subbasins.

Analyze Subbasins Area-Altitude Plots


This dialog allows you to create area-altitude plots for individual subbasins or other
mask cells that are stored in a RiverTools Mask (RTM) file. You begin by selecting
an RTM file, which may have been created by any of the dialogs in the Extract
Mask menu. Click on the Plot All Cells with Labels button to create a plot that
shows each cell with its own color and numeric label. You can then enter the number
of the mask cell or shape for which you want to create an area-altitude plot. You can
also choose from several types of area-altitude plot, and whether to use the original or
depression-filled DEM.

The Analyze Menu

RiverTools Users Guide

Chapter 2: How to Use the RiverTools Dialogs

135

The Window Menu


The Window menu allows you to manage your RiverTools windows.

Window Find Window


This dialog displays a list of window titles, with one entry for each window that is
currently being managed by RiverTools. Selecting a title causes the corresponding
window to be brought to the top.

Window Save Window As


Any graphics window that you create with RiverTools can be saved as an image in a
variety of different popular formats, such as JPEG, BMP, PICT, PNG, TIFF and others. The size of the (raster) image will be the same as the size on your screen, as measured in pixels. The same color scheme (or a close approximation) and image
orientation will be used for the saved image. You can view some of these images (like
JPEG) with web browsers, while you may need a more specialized image-viewing
application for some of the others. Note that you can export an RTG (RiverTools
Grid) file as GeoTIFF (which includes georeferencing information) via the File
Export Grid dialog.

Window Close All Windows


Selecting this option causes all of the graphics windows that are currently managed
by RiverTools to be closed or deleted.

Window Close All Dialogs


This option causes all of the dialog boxes that are currently managed by RiverTools
to be closed or deleted.

Window Clear Log Window


Selecting this option clears all text from the main log window.

Window Save Log Window


This option allows you to save all of the text in the main log window to a text file
(ASCII). The number of lines in the log window buffer is set in the Main Window
panel of the File Set Preferences dialog. You will be prompted for the filename
and directory.

RiverTools Users Guide

The Window Menu

136

Chapter 2: How to Use the RiverTools Dialogs

The User Menu


This menu is where you can extend RiverTools by adding buttons to launch custom
programs that you or others have written in IDL. When RiverTools is first installed,
this menu has five example entries, which result from instructions that are read from
the file user.txt in the RiverTools Menu folder every time RiverTools starts up.
If you have purchased IDL (from Research Systems, Inc.) in addition to RiverTools,
then any files found in the Menu folder with the extension .pro will be compiled
automatically when RiverTools is started from within IDL. Whether or not you have
purchased IDL, RiverTools will automatically compile (or restore) any files with the
extension .sav that are found in the Menu folder at start-up. Note that these files
must have been created by IDL version 6.0 to ensure compatibility. The file
user.txt can be can easily be edited to modify the examples or add new ones. See
the section called Adding Extensions on page 62 for step-by-step instructions on
how to add your own routines to the User menu.
The first four entries in this menu are examples of well-known models that have been
explored in an effort to understand the self-similar and scaling structure of river networks. They provide simple, graphical explanations of some key scaling concepts,
and can be used for instructional purposes or amusement. These plots can be maximized to fill your computer screen by clicking the windows maximize button in the
upper right corner. The last entry shows how a free, open-source and spatially-distributed hydrologic model called TopoFlow can be used as an extension to RiverTools.

Von Koch Curve


This displays the well-known von Koch curve which is often used to illustrate the
concept of a fractal. If the pattern is continued endlessly down to finer and finer
scales, the resulting curve will have infinite length and will be nowhere differentiable.

Scheidegger Model
This model was proposed by Scheidegger (1967) as a spatially-embedded theoretical
model for river networks. You start with a triangular lattice (equilateral triangles).
You then flip a coin for each lattice vertex to decide whether to connect it to the vertex below and to the left, or to the vertex below and to the right. Once you have done
this for every vertex, the result is a tree-like pattern that looks a bit like a river network. You can apply mathematical results from random walk theory to analyze the
scaling properties of this model, and some of them are similar to what has been
observed for real river networks. It turns out, however, that very large networks in

The User Menu

RiverTools Users Guide

Chapter 2: How to Use the RiverTools Dialogs

137

this model are exceedingly skinny, so much so that they are a poor model for large
river networks. A list of papers that discuss this model can be found in Recommended Reading on page 64.

Binomial Cascade
This is the simplest model of a multifractal measure, and is often used to illustrate the
concept of a multifractal. Certain features of large river networks have surprising
connections to multifractals, and multifractals also come up in theoretical models that
attempt to elucidate the observed scaling structure in rainfall fields. You can learn
more about this model in just about any book on fractals.

Self-Similar Tree
Self-similar tree graphs provide a very flexible and mathematically tractable model
for river networks. An infinite variety of fractal trees can be constructed by changing the parameters of this model. This model utilizes the well-known Strahler stream
order concept, and helps to explain many of the observed scaling properties of real
river networks. RiverTools has many tools for analyzing the extent to which the
geometry, topology (branching structure), and statistics of real river networks are
self-similar. These can be found in the Analyze menu, under Strahler Streams. Click
on Side Trib. Matrix in the Strahler Stream menu to see the computed side tributary
matrix or generator matrix for your river network. If this matrix has the property
that the values along diagonals are roughly constant, then a self-similar tree can be
used to model the average branching structure. See the Recommended Reading list to
learn more about self-similar trees.
The plot shows an example of a self-similar tree. More leaves can be added to the
tree by iterating the construction procedure down to finer and finer scales. The example shown happens to have the same branching structure as the average tree that is
generated by the well-known random topology model of river networks that was
introduced by Shreve (1966, 1967, 1969).

TopoFlow
This launches a free, open-source, spatially-distributed hydrologic model called
TopoFlow that has a point-and-click interface. The TopoFlow model is a community
effort written entirely in IDL. Version 1.0 is included with RiverTools 3.0 as an
example plug-in, but may not be the most recent version.

RiverTools Users Guide

The User Menu

138

Chapter 2: How to Use the RiverTools Dialogs

The Help Menu


This menu provides online access to all of the RiverTools documentation. The documentation is cross-referenced and hyper-linked so that you can quickly find the information you need.

Help Contents
This item provides access to the contents of the RiverTools Users Guide. The Users
Guide contains chapters on the following topics: Using RiverTools, Elevation Data
Sets and Formats, How to Use the Dialogs, Glossary and RiverTool Formats.

Help Tutorials
This item provides access to a collection of hyper-linked tutorials that you can use to
learn more about RiverTools.

Help Whats New in 2.4


This item provides a brief overview of features that were introduced in version 2.4.

Help Whats New in 3.0


This item provides a brief overview of new features in the current release.

Help Users Guide


This item opens the RiverTools 3.0 Users Guide as a PDF file.

Help Command Reference


This item opens the RiverTools Command Reference as a PDF file.

Help About RiverTools


This dialog shows you the version of RiverTools and IDL that you are using, and
some information about your computer and operating system. The image at the top is
a shaded relief image of the Grand Canyon in Arizona.

The Help Menu

RiverTools Users Guide

Chapter 3:

Elevation Data Sets


and Formats
New technology and cooperative projects between government agencies and other
organizations has resulted in drastically improved DEMs for many parts of the Earth
and Mars. The availability and quality of elevation data is increasing so rapidly that it
can be difficult to keep abreast of the latest developments. This chapter contains onepage executive summaries or fact sheets for many of the digital elevation data sets
and formats that are currently in use around the world. All of the information you
need to acquire and work with these data sets and formats is provided and all of them
can be imported into RiverTools. Several of these data sets are included on the RiverTools sample data CD.
The formats discussed in this chapter are ones that are used by various government
agencies for the distribution of digital terrain data. Most of these are not associated
with a particular application or vendor.
While web site addresses are given for each data set and format, these addresses are
subject to change. If you encounter an address that has changed, try the first parts of
the address, which may still be valid. You can also try changing the extension to:
.htm, .html, or .cfm. Otherwise, you may be able to contact the responsible
source agency directly.

140

Chapter 3: Elevation Data Sets and Formats

An extensive listing of elevation data sets from around the world is available online
in the Digital Elevation Data Catalogue (http://www.geo.ed.ac.uk/home/ded.html) at
the Department of Geography at the University of Edinburgh. However, this information does not extend beyond 1997.
A useful listing of European DEMs is currently maintained by CERCO/MEGRIN as
part of their GDDD (Geographical Data Description Directory). The web address is:
http://www.eurogeographics.org/gddd/index.htm. CERCO is a group of European
National Mapping Agencies and MEGRIN is a daughter organization created to facilitate the distribution of European geospatial data.

RiverTools Users Guide

Chapter 3: Elevation Data Sets and Formats

141

Australian Geodata 9-Second DEM


Description
The Geodata 9-Second DEM for Australia provides gridded elevation data for the
entire continent with a grid spacing of 9 arcseconds (roughly 250 meters). The DEM
was created as a collaborative effort that involved the Australian Geological Survey
Organization (AGSO), the Australian Surveying and Land Information Group (AUSLIG), the Australian Heritage Commission and the Center for Resource and Environmental Studies (CRES) at the Australian National University (ANU). Released in
1996, it was gridded from vector data using the ANUDEM algorithm to create a
hydrologically consistent DEM. The DEM consists of 37 tiles which vary in size but
many span roughly 6 degrees of longitude and 4 degrees of latitude. The tiles have
been mosaicked by AGSO to create a color image product that has 16289 columns
and 13897 rows. (Australia lies roughly between 110 to 155 degrees longitude, and 45 to -7 degrees latitude.) The data is distributed in both Gridded ASCII and XYZ
(ASCII) formats and has elevation units of meters. Georeferencing is relative to the
AGD66 (Australian National 1966) ellipsoid and the Australian Height Datum.

Data Source
Australian Surveying and Land Information Group (AUSLIG)

Data Availability
Tiles may be purchased from AUSLIG on CD-ROM. Current pricing depends on the
number of users and is available online at the address listed below. Other AUSLIG
DEMs with a grid spacing of 3 arcseconds are available for most populated regions in
Australia.

Web sites
Main Page: http://www.ga.gov.au/nmd/products/digidat/dem_9s.htm
Australia DEMs: http://www.ga.gov.au/nmd/products/digidat/dem.htm
Metadata: http://www.auslig.gov.au/meta/meta15.htm
Sample data: http://www.ga.gov.au/download/nmd_download/samples.jsp
Index: http://www.ga.gov.au/nmd/products/digidat/images/index.gif
Geoscience Australia: http://www.ga.gov.au

RiverTools Users Guide

142

Chapter 3: Elevation Data Sets and Formats

CDED (Canadian Digital Elevation Data)


Description
CDED provides gridded digital terrain data for Canada at scales of 1:50K and
1:250K. The file format for this data is virtually identical to the USGS standard
ASCII format, and can be imported as USGS Standard Format. Grid spacing at both
scales is based on Geographic coordinates and varies with latitudinal zone (A, B, or
C) from 0.75 to 1.5 to 3 arcseconds for the 1:50K data and from 3 to 6 to 12 arcseconds for the 1:250K data. Elevations are stored as signed 2-byte integers, in units of
meters relative the mean sea level, based on the North American Datum 1983 horizontal reference datum (GRS 80 ellipsoid).

Data Source
Centre for Topographic Information (CTI) of Natural Resources Canada (NRC)

Data Availability
Data at the 1:250K scale is available for the entire country, while data at the 1:50K
scale provides only partial coverage, mainly in regions with significant economic
activity. Current pricing is available online.

Web site
Center for Topographic Information (Canada): http://www.cits.rncan.gc.ca

RiverTools Users Guide

Chapter 3: Elevation Data Sets and Formats

143

DTED (Digital Terrain Elevation Data)


Description
The DTED format was developed for the distribution of gridded elevation data that
was assembled by the US Defense Mapping Agency (DMA), now the National Imagery and Mapping Agency (NIMA). DTED data is available at three different resolutions, which are referred to as Level 0, Level 1 and Level 2. Each DTED file contains
elevation data for a 1 degree latitude by 1 degree longitude cell. Elevations are stored
as signed 2-byte integers with a byte order of MSB (high order first) and units of
meters. For latitudes between -50 and 50, pixel dimensions are given by:
DTED Level 0: 30 arcseconds (121 columns x 121 rows)
DTED Level 1: 3 arcseconds (1201 columns x 1201 rows)
DTED Level 2: 1 arcsecond (3601 columns x 3601 rows)

Latitudes closer to the poles are divided into 4 zones, and the x-size of pixels differs
for each zone, getting larger toward the poles.

Data Source
National Imagery and Mapping Agency (NIMA) of the U.S. Department of Defense

Data Availability
Level 0 data is available for most of the world. Level 1 data is available for the US
and is distributed in a different format by the USGS. NIMA will acquire new Level 2
data as a result of the Shuttle Topography Radar Mission.

Web sites
Download Level 0 DEMs:

http://164.214.2.59/geospatial/products/DTED/dted.html
NIMA Home: http://www.nima.mil

RiverTools Users Guide

144

Chapter 3: Elevation Data Sets and Formats

ETOPO5
Description
ETOPO5 (Earth Topography 5-minute) is a gridded elevation (land) and bathymetry
(sea floor) data set for the entire Earth at a grid spacing of 5 minutes (1/12 of a degree
or 300 arcseconds). The entire data set consists of a single file which has 4320 columns and 2160 rows. This data set was compiled using data from many different
sources by the National Geophysical Data Center (NGDC), which is part of the
National Oceanic and Atmospheric Administration (NOAA). Most of the data set
dates to 1988, except for a small area in Canada that was regridded in 1990. Elevation
values are stored in a flat binary file (row major, no header) as signed 2-byte integers,
and are available with both the LSB and MSB byte orders. The elevation units are
meters.
Note
The newer GLOBE and GTOPO30 data sets also provide global coverage at the
much higher resolution of 30 arcseconds.

Data Source
National Geophysical Data Center (NGDC) of the National Oceanic and Atmospheric Administration (NOAA)

Data Availability
This data set provides global coverage and can be obtained free of charge from
NGDC/NOAA.

Web site
ETOPO5 Main: http://www.ngdc.noaa.gov/mgg/global/seltopo.html

RiverTools Users Guide

Chapter 3: Elevation Data Sets and Formats

145

GeoTIFF
Description
GeoTIFF is a standard for storing georeferencing and geocoding information in a
TIFF 6.0 compliant raster file. TIFF (Tagged-Image File Format) is a public-domain,
platform-independent file format created by Aldus-Adobe for storing raster data and
ancillary information in a single file. Ancillary information is encoded in a TIFF file
using a flexible mechanism called tags, and GeoTIFF uses a standardized set of tags
to encode georeferencing information for the raster data in the file. The GeoTIFF
standard accomodates multi-band imagery as well as single-band DEMs. GeoTIFF
was developed through something of a grass roots effort beginning in the early nineties as a nonproprietary and vendor- and platform-independent format for georeferenced imagery.
Note
GeoTIFF DEMs are not yet common. RiverTools only supports GeoTIFF DEMs
which use the UTM projection or Geographic coordinates.

Data Source
There is no single source of GeoTIFF data. However, several organizations are or
soon will be providing data in the GeoTIFF format/standard. A partial list can be
found at: http://www.remotesensing.org/geotiff/providers.html. Since many programs, including RiverTools, can now export data to the GeoTIFF format, this format
is frequently used for sharing data between GIS applications.

Data Availability
See comments for Data Source.

Web sites
GeoTIFF Main: http://www.remotesensing.org/geotiff/geotiff.html

RiverTools Users Guide

146

Chapter 3: Elevation Data Sets and Formats

GLOBE (Global Land One-km Base Elevation)


Description
GLOBE is an international effort to create a global digital elevation model (DEM) on
a nominal 1-kilometer grid. Data from a variety of sources was compiled and independently peer-reviewed to provide 30 arcsecond grid spacing, which corresponds to
approximately one kilometer near the equator. GLOBE Version 1.0 was completed
and released in 1999. GLOBE is an activity of the Committee on Earth Observation
Satellites (CEOS), and is part of Focus 1 of the International Geosphere-Biosphere
Programmes Data and Information System (IGBP-DIS).
GLOBE coverage is divided into sixteen tiles. Each tile spans 90 degrees of longitude
has 10800 columns. Tiles bordering the equator span 50 degrees of latitude and have
6000 rows, while the remaining tiles span 40 degrees and have 4800 rows. Elevation
data is stored as signed 2-byte integers in flat binary (row major) files with the LSB
byte order and units of meters. Header files for several formats are also available.
Bathymetric data is not yet included but is planned for a future version of GLOBE.
Note
During the creation of the GLOBE data set, another global, 30-arcsecond elevation
data set called GTOPO30 was also created, but the two projects differ in a variety of
ways.

Data Source
National Geophysical Data Center (NGDC) of the National Oceanic and Atmospheric Administration (NOAA)

Data Availability
The GLOBE data set is available online from NOAA/NGDC and on a collection of
CD-ROMs.

Web sites
Main page: http://www.ngdc.noaa.gov/seg/topo/globe.shtml
Documentation: http://www.ngdc.noaa.gov/seg/topo/report

RiverTools Users Guide

Chapter 3: Elevation Data Sets and Formats

147

GMT / netCDF
Description
GMT (Generic Mapping Tools) is a public-domain collection of command-line routines for creating maps on UNIX platforms. GMT uses a special adaptation of the
netCDF format for storing gridded raster data.

Data Source
There is no single source of data in this format, but the National Geophysical Data
Center (NGDC) of NOAA recently released a beta version of the IBCAO (International Bathymetric Chart of the Arctic Ocean) Arctic Bathymetry data set in the
GMT/netCDF format. For more information on the IBCAO data set, see the section
IBCAO Arctic Bathymetry in this chapter.

Data Availability
This format is primarily used for bathymetric data.

Web site
IBCAO Arctic Bathymetry from NGDC:

http://www.ngdc.noaa.gov/mgg/bathymetry/arctic/arctic.html

RiverTools Users Guide

148

Chapter 3: Elevation Data Sets and Formats

GTOPO30
Description
GTOPO30 is a global digital elevation model (DEM) with a horizontal grid spacing
of 30 arcseconds (about 1 kilometer at the equator). GTOPO30 was developed
through a collaborative effort led by staff at the USGS EROS Data Center. NASA
and several other organizations around the world contributed to the project, which
was completed in late 1996. The data set provides complete global coverage divided
into 33 tiles. Ocean pixels are flagged with a nodata value of -9999.
For latitudes between -60 and 90 degrees there are 27 tiles, each spanning 50 degrees
of latitude (6000 rows) and 40 degrees of longitude (4800 columns). Latitudes
between -90 and -60 correspond to Antarctica, which is covered by 6 tiles, each spanning 30 degrees of latitude (3600 rows) and 60 degrees of longitude (7200 columns).
The data for Antarctica is also available in a polar stereographic projection consisting
of a single tile that has 5400 columns and 5400 rows and a grid spacing of 1000
meters. Elevation data for all tiles is stored as signed 2-byte integers in flat binary
(row major, no header) files with the MSB byte order and units of meters above mean
sea level. Georeferencing information is in a separate ASCII header (HDR) file. The
reference ellipsoid/datum is WGS84.
The GLOBE data set offers similar coverage but differs in several respects.

Data Source
EROS Data Center (EDC) of the US Geological Survey (USGS) of the US Department of the Interior

Data Availability
All of the tiles can be previewed and downloaded free of charge from EROS Data
Center, from the website listed below. The product is also available on 5 CD-ROMs.

Web site
Download page: http://edcdaac.usgs.gov/gtopo30/gtopo30.html
Document page: http://edcdaac.usgs.gov/gtopo30/README.html

RiverTools Users Guide

Chapter 3: Elevation Data Sets and Formats

149

IBCAO Arctic Bathymetry


Description
The International Bathymetric Chart of the Arctic Ocean (IBCAO) is a digital data
base that contains all available bathymetric data north of 64 degrees North. This
project, which began in 1997, is a cooperative effort between researchers at eleven
different institutions in eight countries. The countries involved are Canada, Denmark,
Germany, Iceland, Norway, Russia, Sweden, and the USA. Five of the key organizations involved were the International Arctic Science Committee (IASC), the International Hydrographic Organization (IHO) the Intergovernmental Oceanographic
Commission (IOC), the US National Geophysical Data Center (NGDC/NOAA), and
the US Office of Naval Research (ONR).
A beta version of the IBCAO grid was released in 2000 and has been included on the
RiverTools sample data CD. The grid has 2323 rows and 2323 columns, with a grid
spacing of 2500 meters along both axes. It uses a polar stereographic projection with
true scale at 75 degrees North, and the WGS 84 horizontal datum. Elevation values
are stored as 4-byte floating point numbers with units of meters. The grid is available
in both gridded ASCII and GMT/netCDF formats. A geographic version of the
IBCAO beta grid with 2.5-minute (150 arcseconds) grid spacing will be available in
2001.
For more information, see the following paper:
Jackobsson, M., N.Z. Cherkis, J. Woodward, R. Macnab, and B. Coakley. New grid
of Arctic bathymetry aids scientists and mapmapkers; Eos, Transactions, American
Geophysical Union, 81(9), February 29, 2000.

Data Source
Word Data Center for Marine Geology and Geophysics (WDC MGG) of the National
Geophysical Data Center (NGDC) of the National Oceanic and Atmospheric Administration (NOAA)

Data Availability
The IBCAO beta grid can be downloaded free of charge from the web site below.

Web site
IBCAO Home: http://www.ngdc.noaa.gov/mgg/bathymetry/arctic/arctic.html

RiverTools Users Guide

150

Chapter 3: Elevation Data Sets and Formats

LIDAR Data (Light Detection and Ranging)


Description
Light Detection and Ranging (LIDAR) is a remote sensing technology that can be
used to collect both vegetative cover (e.g. forest canopy) and topographic data. Post
processing is used to separate vegetative and topographic signals, and the accuracy of
the topographic data is somewhat reduced when dense vegetative cover is present.
The laser system is usually mounted in an aircraft and flown at relatively low altitude
over a region of interest to produce high-resolution data sets. Horizontal resolutions
(pixel size) of one meter or better are possible. Due to the manner in which the data is
collected, it is often released in the form of irregular (nongridded) XYZ triples, which
can then be used to create a raster grid. RiverTools can import LIDAR data in this and
other formats.
The National Oceanic and Atmospheric Administration (NOAA) Coastal Services
Center is using LIDAR in their Topographic Change Mapping project, in partnership
with NASA and the USGS, to document topographic change along shorelines. In this
project, data is collected by the Airborne Topographic Mapper (ATM). The ATM collects 3000 to 5000 spot elevations per second as the aircraft travels over the beach at
approximately 60 meters per second, or 135 miles per hour. Using the ATM, vertical
accuracies of 20 centimeters have been achieved. Elevation data from subsequent
flights can be used to quantify changes due to erosion.

Data Source
The is no single data source, although NOAA collects and shares some LIDAR data
on the web. Several private companies can be hired to collect LIDAR data for regions
of interest.

Data Availability
NOAA has an online LIDAR Data Retrieval Tool (LDART) that allows researchers
to share available LIDAR data. Most existing LIDAR data has been collected for specific research projects involving relatively small areas. Many of these are concerned
with evaluating the advantages and limitations of LIDAR data.

Web sites
NOAA LIDAR: http://www.csc.noaa.gov/crs/tcm/index.cfm
LDART web site: http://www.csc.noaa.gov/crs/tcm/ATM_download.cfm

RiverTools Users Guide

Chapter 3: Elevation Data Sets and Formats

151

MOLA (Mars Orbiter Laser Altimeter)


Description
The Mars Orbiter Laser Altimeter (MOLA) is an instrument currently in orbit around
Mars on the Mars Global Surveyor (MGS) spacecraft. MOLA collects high-resolution topographic data for Mars by transmitting infrared laser pulses toward the red
planet at a rate of 10 Hz and accurately measuring the return time. MOLA was
designed and built by the Laser Remote Sensing Branch of the Laboratory for Terrestrial Physics at Goddard Space Flight Center (GSFC/NASA).
A DEM for the entire planet with a grid spacing of 1/16 degree (225 arcseconds, or
about 3.7 km at the equator) is available and has 5760 columns and 2880 rows. It is
distributed as a flat binary file (row major, no header) with the extension .IMG,
with geocoding data in a separate ASCII file with extension .LBL. Elevation values
are stored as signed 2-byte integers with the MSB byte order and units of meters. A
spherical planet model (areocentric) is used with a radius of 3396.0 km.
As the MGS spacecraft continues to circle Mars, it creates DEMs of increasingly
higher resolution. As of August 2003, DEMs with grid spacings of 1/32 degree, 1/64
degree and 1/128 degree are available! The last of these corresponds to less than 0.5
km at the equator. The one with grid spacing of 1/32 degree (112.5 arcseconds) has
11520 columns and 5760 rows. MOLA DEMs can be imported directly into RiverTools with the Import DEM menu in the File menu.
Mars has many dramatic topographic features, including (1) huge impact craters in
the southern hemisphere, such as Hellas (9 km deep, 2100 km across), deep enough
to hold Mount Everest, (2) a super canyon system, Valles Marineris (10 km deep,
5000 km long), that would span the US, (3) many large volcanoes, including Olympus Mons (26 km), three times taller than Mount Everest (8.8 km) and (4) erosional
features that appear to be due to massive surface water fluxes.

Data Source
Goddard Space Flight Center (GSFC) of NASA.

Data Availability
Gridded elevation data with grid spacings of 1/128, 1/64, 1/32, 1/16, 1/8, and 1/4 of a
degree (28.125, 56.25, 112.5, 225, 450, 900 arcseconds) can be downloaded from the
MOLA web site listed below.

RiverTools Users Guide

152

Chapter 3: Elevation Data Sets and Formats

Web sites
MGS Home: http://marsweb.jpl.nasa.gov/mgs/index.html
MOLA Home: http://ltpwww.gsfc.nasa.gov/tharsis/mola.html
MOLA Data: http://wufs.wustl.edu/missions/mgs/mola/
MOLA DEMs: http://wufs.wustl.edu/missions/mgs/mola/megdr.html

RiverTools Users Guide

Chapter 3: Elevation Data Sets and Formats

153

NED (National Elevation Dataset)


Description
The National Elevation Dataset (NED) is a new raster product assembled by the US
Geological Survey (USGS) from several other US data sets. It is designed to provide
elevation data for the United States in a seamless form with a consistent datum, elevation unit, and projection. NED has a horizontal resolution of 1 arcsecond (approximately 30 meters at the equator) for the conterminous US, Hawaii, and Puerto Rico,
and 2 arcseconds for Alaska. Actual pixel dimensions in meters vary with the cosine
of latitude. Since most of Alaska is north of 60 degrees latitude, and since
cos(60)=1/2, pixel dimensions in Alaska are also close to 30 meters. Elevation units
are decimal meters. North American Datum 1983 (GRS 80 ellipsoid) is used as the
horizontal datum, and the data is in the Geographic projection. The NED is nearing
completion and will be distributed in the Spatial Data Transfer Standard (SDTS) Raster Profile format. The SDTS format is described later in this chapter. The NED will
be updated to incorporate data of higher resolution or quality as it becomes available.
During the NED assembly process, source data was corrected when necessary to minimize artifacts and to provide better edge matching near seams between adjacent
source DEMs. The source data included USGS 7.5-minute DEMs (UTM, 30 meter
pixels) for which edge matching problems are not uncommon.

Data Source
US Geological Survey (USGS) of the US Department of the Interior

Data Availability
NED DEMs became available in 2001 for download from the Internet and on standard distribution media. An Internet browse tool is provided as an aid to ordering
subsets of NED that span a user-specified range of latitudes and longitudes.

Web sites
USGS Home: http://www.usgs.gov
NED Home: http://gisdata.usgs.net/ned
NED Fact Sheet: http://mac.usgs.gov/mac/isb/pubs/factsheets/fs14899.cfm

RiverTools Users Guide

154

Chapter 3: Elevation Data Sets and Formats

NOAA/NOS EEZ Bathymetry


Description
The US Exclusive Economic Zone (EEZ) is a zone that surrounds all US possessions
and trust territories to a distance of 200 nautical miles from the coastline. Sovereign
rights to all natural resources in this zone were unilaterally declared by Presidential
Order on March 10, 1983. The combined area of this zone is equal to two-thirds of all
US lands prior to the declaration.
Gridded bathymetric data for the EEZ was released by the National Ocean Service
(NOS) of NOAA in 1991. The source data was collected using multibean swath
sounding techniques. The gridded data is available in two forms: a UTM (Universal
Transverse Mercator) grid and a Geographic grid. Each grid spans one-half degree of
latitude and one degree of longitude, except for grids in Alaska which span 1.5
degrees of longitude. The UTM grids have a grid spacing of 250 meters and contain
about 230 rows and a latitude-dependent number of columns. They are stored in
ASCII files that have the extension .DAT, with geocoding information in a separate
ASCII file that has the extension .PRU. The Geographic grids have a grid spacing
of 15 arcseconds (approximately 465 meters near the equator) and always have 121
rows and 241 columns. They are stored in ASCII files that have the extension
.GRD, with geocoding information in a separate ASCII file that has the extension
.PRG. Data values are negative integers that represent depths in meters. Missing
data is flagged with a value of 0. The horizontal datum is North American Datum
1983 (GRS 80 ellipsoid).

Data Source
Word Data Center for Marine Geology and Geophysics (WDC MGG) of the National
Geophysical Data Center (NGDC) of the National Oceanic and Atmospheric Administration (NOAA)

Data Availability
This data can be purchased online and is available on various media. It is included on
NGDCs Global Relief CD-ROM. It is unclear whether complete coverage of the
EEZ is available.

Web site
MGS Home: http://www.ngdc.noaa.gov/mgg/bathymetry/multi-

beam/multibeam_products.html
RiverTools Users Guide

Chapter 3: Elevation Data Sets and Formats

155

Notes
The US Geological Survey has been charged with surveying this region, and in 1984
launched a project called EEZ-SCAN to study it with a long-range sidescan sonar
system called GLORIA (Geological Long-Range Inclined Asdic). For more information on this project see: http://walrus.wr.usgs.gov/gloria.

RiverTools Users Guide

156

Chapter 3: Elevation Data Sets and Formats

SDTS Raster Profile


Description
The Spatial Data Transfer Standard (SDTS) is a standard that defines a general, nonproprietary format for the distribution and archiving of vector and raster spatial data
with attributes, metadata, a data quality report, and usually a data dictionary. The
SDTS is of special importance because it is a federally mandated standard and many
federal agencies in the United States are, or soon will be, distributing their spatial
data sets in this format. Other countries are currently considering the adoption of the
SDTS.
SDTS is a very general standard with provisions that allow it to support virtually any
type of spatial data. Because of this, a single program cannot be expected to ingest
data from an arbitrary SDTS file set. Instead, there are well-defined conventions for
encoding specific types of data in SDTS format, called profiles. Profiles are essentially special cases of SDTS. Some common SDTS profiles are the Raster Profile (for
raster data such as DEMs), the Topological Vector Profile (for many types of vector
data), and the Point Profile (for high-precision geodetic control and survey points).
In 1998, the US Geological Survey (USGS) began distributing some of their spatial
data holdings in this new format. In particular, they converted all of their high-resolution 7.5-minute DEMs (UTM, 30 meter pixels) to the SDTS Raster Profile format
and made them available on the Internet for free download. They also converted their
1:24K Digital Line Graph (DLG) data, which have a comparable resolution, to the
SDTS Topological Vector Profile format. RiverTools can ingest data in both of these
formats. An SDTS transfer typically consists of many separate files with the extension .DDF. The data in these files conforms to the ISO 8211 data exchange standard. They are often bundled and compressed into a single file for distribution. The
raster or vector data is typically contained in just one of the files, while the remaining
files tend to be small and contain various types of metadata. An SDTS Raster Profile
DEM consists of about 18 files, with the elevation data in a file that has the extension
*CEL0.DDF. Questions about SDTS should be sent to sdts@usgs.gov.
Starting in July 2001, the USGS stopped distributing 7.5-minute DEMs in the SDTS
Raster Profile format from their website and instead began to authorize private companies to act as distributors of this data. As of June 2003, the USGS had partnered
with three such companies: Geocomm International Corp., ATDI, and MapMart.com
(see links below). Each has a website that allows the data to be downloaded for free,
although download speed is purposely slowed in some cases. The data given to these
companies by the USGS had some slight differences in formatting such that most
software that had supported the SDTS Raster Profile format prior to that time would
RiverTools Users Guide

Chapter 3: Elevation Data Sets and Formats

157

not import the new data without application of a patch or service pack. RiverTools
version 2.4 will not import this new data correctly unless you download and install
Service Pack 1 (SP1) or higher.

Data Source
Raster Profile DEMs and Topological Vector Profile DLGs are available from the
EROS Data Center of the US Geological Survey (USGS).

Data Availability
7.5-minute DEMs (UTM, 30 meter pixels) for the entire US in SDTS Raster Profile
format are available and can be downloaded free of charge from the USGS. It is
expected that SRTM data will also be distributed in SDTS Raster Profile format.

Web sites
USGS SDTS Page: http://mcmcweb.er.usgs.gov/sdts
EROS Data Center: http://edc.usgs.gov
USGS Statement: http://edc.usgs.gov/geodata/
USGS Earth Explorer: http://earthexplorer.usgs.gov
DEMS - GIS Data Depot: http://data.geocomm.com/dem/
DEMS - ATDI: http://www.atdi-us.com/
DEMS - MapMart.com: http://www.mapmart.com/DEM.htm

RiverTools Users Guide

158

Chapter 3: Elevation Data Sets and Formats

SRTM (Shuttle Radar Topography Mission)


Description
The Shuttle Radar Topography Mission (SRTM) was a 10-day mission which flew on
the Space Shuttle Endeavour in February 2000. It was a cooperative project between
NASA and the National Imagery and Mapping Agency (NIMA, formerly Defense
Mapping Agency) that collected high-resolution topographic data for most of the
land surfaces between -54 and 60 degrees latitude. Data was collected using a method
called single-pass radar interferometry, with two imaging radar systems on the Shuttle separated by a 60 meter mast. This technology is based on the Spaceborne Imaging Radar - C/X-Band Synthetic Aperture Radar (SIR-C/X-SAR) that was used on
two previous Shuttle missions.
Although the data collection effort has been completed, the post-processing and validation necessary to produce a final gridded data set is scheduled to take until October
2002. The final data set will then be delivered to the EROS Data Center (EDC) of the
USGS for distribution, probably in the SDTS Raster Profile format. For latitudes
between -50 and 50, the grid spacing will be 1 arcsecond of latitude and longitude
(about 30 meters at the equator and decreasing towards the poles). For latitudes
between -54 and 50 and between 50 and 60, the grid spacing will be 1 arcsecond of
latitude and 2 arcseconds of longitude. Each tile in the data set will span 5 degrees of
latitude and 5 degrees of longitude. For the region between -50 and 50, each tile will
then contain 18000 rows and 18000 columns. Elevations will be measured in meters
relative to the WGS84 ellipsoid model.

Data Source
The final data set will be distributed by EROS Data Center (EDC) of the US Geological Survey (USGS).

Data Availability
Coverage includes most land surfaces between -54 and 60 degrees latitude. Within
the US, the full-resolution data will be released without restrictions. Outside the US,
the grid spacing will be reduced from 1 to 3 arcseconds. It is expected that continental
data sets will start to be available in November 2001. NIMA will reformat the data
into their DTED format and handle distribution to the Department of Defense.

Web sites
SRTM Home: http://www.jpl.nasa.gov/srtm
RiverTools Users Guide

Chapter 3: Elevation Data Sets and Formats


Data Products: http://www.jpl.nasa.gov/srtm/dataproducts.html
Data at the USGS: http://srtm.usgs.gov
Data for the Americas: ftp://edcsgs9.cr.usgs.gov/pub/data/srtm

RiverTools Users Guide

159

160

Chapter 3: Elevation Data Sets and Formats

USGS Standard
Description
For many years, the US Geological Survey (USGS) has distributed several different
DEM products in a special ASCII format that organizes raster data into a series of
records. Since the USGS now utilizes the newer and more robust SDTS Raster Profile format for some of their DEM products, this original format is referred to as
USGS Standard, USGS Native or USGS ASCII. The products include: (1) 7.5-minute
DEMs (1:24K scale), (2) 1-degree DEMs (1:250K scale), (3) 15-minute DEMs, and
(4) 30-minute DEMs. The product name refers to the extent of coverage of a single
file or tile. Of these, the first two are the most commonly used. Detailed information
for these two products is given in the next two paragraphs.
The 7.5-minute DEM product differs from the others in that it uses Universal Transverse Mercator (UTM) Cartesian coordinates instead of Geographic coordinates. The
grid spacing is exactly 30 meters along both axes. When embedded in a rectangular
grid, jagged nodata regions along all four edges of the DEM result from the difference between true north and grid north in UTM coordinates. The number of rows and
columns varies with latitude, but is typically around 460 by 360. These DEMs use the
NAD 27 datum. These DEMs were produced by a variety of automated methods and
the quality differs widely. Most problems were corrected when these DEMs were
recently converted to SDTS Raster Profile format and released on the Internet.
The 1-degree DEM product is a reformatted version of the Defense Mapping
Agencys (DMA, now NIMA) DTED Level 1 product. Along a meridian of longitude, the grid spacing is always 3 arcseconds (about 92.6 meters at the equator) which
results in 1201 rows. Along parallels of latitude, the grid spacing is 3 arcseconds for
latitudes less than 50 North (1201 columns), 6 arcseconds for latitudes in Alaska
between 50 and 70 North (601 columns), and 9 arcseconds for latitudes in Alaska
greater than 70 North (401 columns). Most of the 1-degree DEMs use the WGS 72
datum, but a few use WGS 84.
A file in the USGS standard format consists of a single Type A record with descriptive header information, followed by any number of Type B records, followed by a
single Type C record. The Type B records contain elevation values along south-tonorth profiles while the Type C record contains very basic statistics on data accuracy.
A logical record size of 1024 bytes is used for all three record types. Type A and Type
C records never span more than one of these logical records, but a Type B record typically spans more than one. If necessary, the logical records are padded with blanks to
maintain this format. This is one reason that files in this format require over three
times the disk space as the same data in a flat binary format.
RiverTools Users Guide

Chapter 3: Elevation Data Sets and Formats

161

Data Source
EROS Data Center (EDC) of the USGS (US Geological Survey)

Data Availability
Complete coverage of the United States for both 7.5-minute and 1-degree products.
For the 7.5-minute DEMs, it is recommended to obtain the corrected data in SDTS
Raster Profile format.

Web sites
GIS Data Depot: http://www.gisdatadepot.com
Earth Explorer: http://earthexplorer.usgs.gov
USGS Home: http://www.usgs.gov

Notes
Regardless of what software you use, you may occasionally encounter difficulties
when reading DEMs with the USGS Standard format. Problems can usually be traced
to one of the following four causes.
(1) The Type A header record is supposed to be 1024 bytes long but users are sometimes tempted to delete the unused padding at the end of this record. The number of
bytes actually used can be either 864 or 896 depending on when the DEM was made.
RiverTools can usually handle all such cases.
(2) Since files in this format are ASCII, end of line characters may not be converted
correctly if you transfer these files between two dissimilar platforms. End of line
characters for PCs, Macs and Unix machines are all different. Programs such as FTP
for transferring files between computers can usually be configured to perform these
end-of-line conversions automatically.
(3) Programs from some vendors allow you to write raster data to USGS Standard
format in a manner that does not conform to the format specifications. This is usually
due to using a nodata value that has six characters, such as -99999. Using a five character nodata value is preferable.
(4) Files may simply be corrupt. DEMs in this format have been around for many
years and they are often shared between users. Errors in the original DEM or errors
introduced by a former user can make the file unreadable. When in doubt, try downloading the DEM again, directly from the USGS.

RiverTools Users Guide

162

Chapter 3: Elevation Data Sets and Formats

RiverTools Users Guide

Appendix A:

RiverTools Files and


Formats
This appendix describes the file formats that are native to RiverTools. All of these
formats are nonpropietary, simple and efficient. The four main file formats are: RTG
(RiverTools Grid), RTM (RiverTools Mask), RTV (RiverTools Vector) and RTS
(RiverTools Sequence or Stack). These are all binary files that are created to have the
same byte order as the associated DEM, as specified in the RTI (RiverTools Information) file. They can be shared across computer platforms because RiverTools automatically performs byte swapping when necessary. As binary files, they can also be
read and processed very rapidly because no costly conversions are required. Another
advantage of these file formats is that they can be merged in various ways to create
new files with the same format. For example, two or more RTV files of the same type
(i.e. tree, link or stream, perhaps with different basin prefixes) that are associated
with the same DEM can be merged via concatenation to create a new RTV file of that
type. This can be done with the Prepare Merge Files dialog. Similarly, two or
more RTM files that are associated with the same DEM can be merged to create a
new RTM file for that DEM. In addition, two or more RTG files can be merged to
create an RTS file.

164

RiverTools Grid (RTG) Files


RiverTools Grid (RTG) are binary files with no header that store a 2D array (or grid)
whose size is the same size as the DEM (*_DEM.rtg) they were derived from. Their
dimensions, georeferencing and other information are identical to the DEM, except
possibly for their data type. Values in the file are stored in row major order; that is,
values for the first (north) row are followed by values for the second row, and so on.
The filesize for an RTG file is always equal to the product:
filesize = (ncols x nrows x BPE)
where BPE is the number of Bytes Per Element in the 2D array. The possible data
types for an RTG file are BYTE, INTEGER, LONG, FLOAT, and DOUBLE.
The corresponding values of BPE are 1, 2, 4, 4, and 8. Each RTG file has a data type
that is appropriate for the range of possible values that array can contain. This use of
the most economical data type results in more efficient use of disk space and faster
access times. Given the number of rows and columns in the DEM (nrows and ncols),
the data type of an RTG file can be deduced from its filesize in all cases except when
BPE is equal to 4. In this case, the data type could be either LONG or FLOAT, and
additional information is required in order to determine which one. A standard, recognized filename extension is one method for deciding between these two data types.
You can also edit the text file flt_list.txt in the RiverTools Menu folder to specify new extensions that you want to associate with floating-point data.
Routines in the Extract menu create RTG files from other RTG files, such as the initial DEM (*_DEM.rtg). For example, the Extract Flow Grid routine will create a
copy of the DEM with the extension _rawDEM.rtg which it will leave unaltered,
and will then fill depressions in the file with extension _DEM.rtg. This routine will
then go on to create a D8 flow grid with extension _flow.rtg from the depressionless DEM grid. This D8 flow grid is then used by other routines in the Extract menu
to create additional RTG files.
Table 3-1: Information for some standard RTG files:
Attribute

File Extension

Data Type

Area

_area.rtg

FLOAT or
LONG

Curvature

_curv.rtg

FLOAT

Elevation

_DEM.rtg

variable

DInf Flow Angle

_dinf.rtg

DOUBLE

Note

RiverTools Users Guide

165

DInf Area

_dinfarea.rtg

DOUBLE

DInf Slope

_dinfslope.rtg

DOUBLE

Flow Distance

_FD.rtg

FLOAT

D8 Flow Codes

_flow.rtg

BYTE

Imposed grad.
DEM

_imposed_DEM
.rtg

FLOAT

Number of D8
Kids

_nkids.rtg

BYTE

HS Stream Order

_order.rtg

BYTE

Raw Elevations

_rawDEM.rtg

variable

Watershed units

_sides.rtg

LONG ??

Local D8 slope

_slope.rtg

FLOAT

Topo. index

_TI.rtg

FLOAT

Pit basin mask

_TMPmask.rtg

LONG

(to an RTM)

There are several RiverTools commands that can be used for working with RTG files
and that are documented in the RiverTools Command Reference. These include
RT_Read_Grid, RT_Check_Grid_Type, RT_Read_Subgrid, RT_Write_Subgrid,
RT_Read_RTM_As_Grid, RT_Get_Available_DEMs, and RT_Get_Available_Grids.
The Extract menu also provides access to many routines for creating RTG files.

RiverTools Users Guide

166

RiverTools Sequence (RTS) Files


RiverTools Sequence (RTS) files are a simple extension of the RTG file format that
allow a sequence of RTG files to be stored in a single file. That is, an RTS file is a
simple concatenation of RTG files that each have the same data type. The main purpose of this format is to provide support for landscape evolution models and spatially-distributed hydrologic models in the RiverTools environment. For example, a
landscape evolution model produces a sequence of DEMs, each of which represents
the topography of the landscape at a particular time in its evolution. Similarly, a spatially-distributed hydrologic model may produce a sequence of grids, each of which
shows how water depths are distributed spatially at a particular time during a storm.
The various RTG files contained within an RTS file are referred to as frames, and all
of the frames are assumed to have the same data type. In version 3.0, only the 4-byte
floating point or FLOAT data type is supported. The Display Grid Sequence dialog can be used to show the frames in an RTS file as an animation, or to display any
single frame in the RTS file. Note that an RTG file with a data type of FLOAT is identical to an RTS file with a single frame.
Unlike the file formats used for movies, no data compression is used in RTS files
because that would result in a loss of information and each pixel of each frame is
assumed to represent valuable data. As a result, however, RTS files can be quite large
and must therefore be managed appropriately. Typically, the number of rows and columns for any given frame in an RTS file will be numbers less than 500. The filesize
of an RTS file can be computed as
filesize = (ncols x nrows x BPE x nframes)
where BPE is the number of bytes per element or pixel. BPE is equal to 4 for the
FLOAT data type and 8 for the DOUBLE data type.

RiverTools Users Guide

167

RiverTools Mask (RTM) Files


RiverTools Mask (RTM) files store the IDL array indices of one or more regions of
interest in a DEM. These regions of interest may also be referred to as shapes or
mask cells. A typical example of a mask cell is a collection of pixels in the DEM
that all belong to (or lie within) the same river basin. RTM files utilize the fact that
IDL allows 2D arrays to be indexed by two different methods. As an example, consider the small 2D array in Table 3-1 called A which has 4 rows and 5 columns.
The array value of 21 in the second column of the third row could be obtained as
A(1,2). But in IDL, it could also be obtained as A(11).
25

30

28

32

34

27

31

27

28

39

23

21

22

33

34

35

20

27

30

29

Table 3-2: An example 2D array called A..


In the second method, each element in the 2D array is assigned a unique long-integer
(4-byte) ID in calendar-fashion, starting in the upper-left corner and wrapping
through the array from left to right and from the first (top) row to the last row. For our
example array, A, these pixel IDs are:
0

10

11

12

13

14

15

16

17

18

19

Table 3-3: Unique IDL array indices or IDs for pixels in 2D array.
Note that the row and column of a pixel whose calendar index is ID can be
obtained as: row = (ID / ncols) and column = (ID mod ncols).
Certain IDL procedures and functions, such as WHERE and SORT return these longinteger IDs. For example, the following call to the IDL function WHERE: w =
WHERE(A lt 30), stores the following 1D array of IDs in the IDL variable w: [0, 5, 7,
8, 10, 11, 12, 16, 17, 19]

RiverTools Users Guide

168

An RTM file stores pixel IDs similar to those returned by the WHERE function in a
binary file as long (4-byte) integers. Indices for different shapes (or mask cells) are
delimited by the long integer -1. As a simple example, two regions of interest (or
mask cells) in the array A are shown below. One mask cell is shown with asterices
and the other is shown with pound signs.
*

#
#

#
Table 3-4: Two shapes in a 2D array.
We can create an RTM file which stores these two mask cells with the following IDL
commands:
IDL> cell1 = [0L, 1L, 5L, 6L]
IDL> cell2 = [8L, 13L, 14L, 18L]
IDL> openw, unit, Two_cells.rtm, /get_lun, SWAP_ENDIAN =
RT_Not_Same_Order()
IDL> writeu, unit, -1L, cell1, -1L, cell2, -1L
IDL> free_lun, unit
The letter L after each integer above is an IDL convention that specifies the data
type as long (4-byte) integer. Notice that the first and last values written to the RTM
file are the long integer -1L, and another -1L is used as a delimeter between the IDs
for the two cells. Notice that the SWAP_ENDIAN keyword to the OPENW command
was used with a RiverTools function called RT_Not_Same_Order that compares the
byte order of your computer to the byte order recorded in the RTI file for the current
data set. You can obtain the byte order of your computer with the following RiverTools command:
IDL RT_Get_Byte_Order, byte_order
IDL print, byte_order
The RTM file format is very simple, but this simplicity also makes it very flexible. As
shown above, it is very easy to create an RTM file for a region of interest. Another
useful feature of RTM files is that concatenating two of them results in a valid RTM
file for the combined set of mask cells. (Two adjacent -1L values are allowed, and are
RiverTools Users Guide

169

viewed as a null cell.) RTM files can be concatenated or merged with the Prepare
Merge Files dialog. Also, RTM files are typically much smaller than the traditional mask files that some GIS programs use. A traditional mask file would have
the same dimensions as the DEM and would use a background value like -1L or 0L
to indicate pixels that are not in the mask. When working with large DEMs, a large
number of traditional mask files would require a very large amount of disk space,
even if the masked regions in each file are very small. A limitation of the RTM file
format is that these files contain no georeferencing and cannot be used independently
of the DEM that they index and the RTI file that contains georeferencing information
for the DEM. However, RTM files can be exported to ESRI shapefiles that contain
spatial coordinates using the File Export Vector Boundaries dialog. They can
also be re-imported for display with the Display ESRI Shapefile dialog.
There are several RiverTools commands that can be used when working with RTM
files and that are documented in the RiverTools Command Reference. These include:
RT_Get_RTM_Info, RT_Read_RTM, RT_Read_RTM_Cell,
RT_Get_RTM_Cell_Area, and RT_Read_RTM_As_Grid.

RiverTools Users Guide

170

RiverTools Vector (RTV) Files


When you extract a river network from a DEM with the first four routines in the
Extract menu, RiverTools automatically computes and archives many different measurements for the channels in the extracted river network. It does this for three different kinds of object: basin pixels, channel links, and Strahler streams. These represent
three different levels of detail in the river network. Measured attributes are stored
in a set of three RiverTools Vector (RTV) files that have the extensions _tree.rtv,
_links.rtv and _streams.rtv. The first three entries in the Analyze menu are
Strahler Streams, Channel Links, and Basin Pixels and each of these has its own
submenu of dialogs that can be applied to the corresponding object.
For every basin pixel, the following attributes are measured and stored in the treefile:
Pixel ID, Parent pixel ID, Strahler order, Drainage area, Straight-line length, Alongchannel length, Elevation drop, Straight-line slope, and Along-channel slope. The x
and y coordinates are always computed from the pixel IDs and georeferencing information in an RTI file.
For every channel link in the network, the following attributes are measured and
stored in the linkfile: Upstream end pixel ID, Downstream end pixel ID, Strahler
order, Drainage area, Straight-line length, Along-channel length, Elevation drop,
Straight-line slope, Along-channel slope, Total length, Shreve magnitude, Main channel length, Relief, Network diameter, Sinuosity, Drainage density, and Source density.
For every Strahler stream in the network, the following attributes are measured and
stored in the streamfile: Upstream end pixel ID, Downstream end pixel ID, Strahler
order, Drainage area, Straight-line length, Along-channel length, Elevation drop,
Straight-line slope, Along-channel slope, Total length, Shreve magnitude, Main channel length, Relief, Network diameter, Sinuosity, Drainage density, Source density,
Links per stream, Tribs of order (w-1), Tribs of order (w-2), and Tribs of order (w-3).
Treefiles, linkfiles and streamfiles are all binary files that store arrays of records. The
ordering of the records in the file reflects a depth first traversal of the rooted tree
graph that starts at the root and always takes the left branch as far down as possible
before ascending to follow another branch. These records are defined in IDL as follows:
tree_record = {pID:0L, outdir:0b, ID:0L, pdist:0L, length:0.0, area:0.0, $
nkorder:0b,drop:DEFDROP}
link_record = {pID:0L, outdir:0b, ID:0L, pdist:0L, length:0.0, area:0.0, nkorder:0b, $

RiverTools Users Guide

171

drop:DEFDROP, mag:0L, LClen:0.0, diam:0L, Tlen:0.0, relief:0}


stream_record = {pID:0L, outdir:0b, ID:0L, pdist:0L, length:0.0, area:0.0, $
nkorder:0b, drop:DEFDROP, mag:0L, LClen:0.0,diam:0L,Tlen:0.0, $
relief:0, nlinks:0, T:[0b,0b,0b]}
The DEFDROP value in the drop field has the same data type as the associated
DEM. The other fields shown in these records are described in the documentation for
the RT_Get_RTV_Record in the RiverTools Command Reference.
Notice that the stored attributes are attribute primitives that can be used to obtain
other attributes such as the drainage density and absolute sinuosity. You can retrieve
any primitive or derived attribute from an RTV file with a RiverTools command
called RT_Read_RTV_Data. This command is documented in the RiverTools Command Reference.
The coordinates of the upstream and downstream endpoints of channels in RTV files
are not stored directly in RTV files, but are obtained from the pixel ID fields called
ID and pID using georeferencing information in the RTI file. Notice that only endpoint coordinates are stored for links and Horton-Strahler streams. However, when
you export channels to ESRI shapefiles with the File Export Vector Channels
dialog, all spatial coordinates from endpoint to endpoint (at the level of DEM pixels)
are stored in the shapefile.
When drainage area is listed as an attribute for a channel link or Strahler stream, the
value refers to the entire contributing area above, but not including, the downstream
node of the link or Strahler stream. The downstream node is similarly used for quantities like total channel length and main channel length.

RiverTools Users Guide

172

RiverTools Information (RTI) Files


RiverTools Information (RTI) files are small, ASCII header files that contain georeferencing and other descriptive information for a DEM grid file that has the same
prefix. RTI files must conform to the following rules, which are included at the bottom of every RTI file.

RiverTools Information filenames must end with .rti.

The first line in the file should be: RiverTools Info File

Any line that starts with a semi-colon is ignored.

Colons are used to delimit labels from values.

Values must be listed in a standard order.

The number of rows and columns are required.

Pixel geometry codes are: 0=Fixed-Angle (Geographic), 1=Fixed-Length (usually UTM).

Pixel x-resolution and y-resolution are required.

Measurement units must be METERS (fixed-length) or DEGREES (fixed-angle).

Elevation data type is required. Allowed types are: BYTE, INTEGER, LONG,
FLOAT, and DOUBLE.

Byte order is required and must be specified as either LSB or MSB.


(LSB = Least Significant Byte = little-endian)
(MSB = Most Significant Byte = big-endian)'

For 'fixed-angle' pixels, bounding latitudes and longitudes are required to compute lengths and areas correctly.

Bounding box coordinates are always for the outer edges of pixels as opposed to
pixel centers.

Latitudes south of equator and longitudes west of prime meridian must be specified as negative numbers.

RTI files are best modified with the File View DEM Info dialog but are simple text files that can also be created and edited with any text editor.

RiverTools Users Guide

173

If have purchased IDL (from Research Systems, Inc.) then you can obtain a structure
which contains all of the information in the RTI file for the current data set with a
RiverTools command called RT_Read_DEM_Info as shown in the following example:
IDL> RT_Read_DEM_Info, info
IDL> print, info.ncols, info.nrows
IDL> print, info.data_type, info.byte_order
For explanations of the other fields in an RTI record, look up RT_Get_RTI_Record in
the RiverTools Command Reference.
You can make a new RTI file with the RT_Get_RTI_Record and RT_Make_RTI_File
commands
You can view, edit or create an RTI file with the View DEM Info dialog in the File
menu. You can launch this dialog from your own IDL program with the
RT_GUI_View_DEM_Info command.

RiverTools Users Guide

174

Other RiverTools Files


In addition to RTG, RTM, RTV and RTI files, RiverTools also creates several text
files. Most of these files are essentially reports, such as files with the extensions
.log, _table.txt, _ratios.txt, and _gen.txt. However, basin information files
have the extension _basin.txt and contain the primary attributes for a particular
basin in a DEM. This file can be viewed with the File View Basin Info dialog.
There are also several dialogs which allow you to save functions or profiles as text
files, such as those in the Extract Function menu. For example, width functions
and area-distance functions are created by the Analyze Channel Links Width
Function and Analyze Basin Pixels Area-Distance Function and are stored
in files which have the extensions _WF.txt and _area_dist.txt. Line and channel
profiles can be saved as multi-column data in text files by choosing Save Profile to
File from the Options menu of a profile plot window. A common extension for text
files that contain profiles is _prof.txt. Area-altitude functions can be saved by first
displaying the function with Analyze Entire Grid Area-Altitude Function
and then choosing Save Curve to File from the plot windows Options menu.
There are many routines available both from the graphical interface and at the command-line level for working with text files. In the graphical interface, the Display
Function dialog allows you to plot functions that are stored as columns of numbers
in a text file. Also, the File View Text File dialog can be used to view any text file.
At the command-line level, the following additional routines are available:
RT_Count_Lines, RT_Read_Function, RT_Read_XYZ_Values, and
RT_GUI_View_Text_File. These are documented in the RiverTools Command Reference.
There is another file created by RiverTools that has the extension _stats.dat. This is
a small binary file that contains basic statistical information for all of the HortonStrahler streams in a given basin. Data can be retrieved from this file using a RiverTools command called RT_Read_Horton_Data. This command is documented in the
RiverTools Command Reference.

RiverTools Users Guide

Appendix B:

RiverTools Glossary
A glossary is an efficient way to learn about something new. Like any branch of science, river network hydrology and terrain analysis are fields with a fair amount of jargon. This chapter contains definitions for terminology that youll see in the
RiverTools dialogs and throughout the online and printed documentation. If you are
diligent about looking up unfamiliar terms, youll learn the lingo in no time. For
many of the terms listed here youll get more than just a definition; youll also get a
useful tip or a tutorial discussion of a concept.

176

8-bit, 16-bit, and 24-bit color


See color schemes on page 182.

along-channel length
The length of a link, Strahler stream, or any other channel segment as measured along
the channel. This is the distance traveled by the water as it flows from one end of the
channel to the other. See straight-line length on page 209.

arcsecond
The distance along the perimeter of a circle (which could be a great circle on the surface of a sphere), that is subtended by an angle of 1 second. This distance depends on
the radius of the circle. On the surface of a spherical planet, all constant-longitude
circles have the same radius, so 1 arcsecond of latitude always corresponds to the
same distance. However, each constant latitude circle has a different radius, which
is largest at the equator and zero at either pole. For this reason, 1 arcsecond of longitude corresponds to a latitude-dependent distance. Note that 1 minute of arc = 60 arcseconds, and 1 degree of arc = 3600 arcseconds. See fixed-angle pixels on
page 188.

area
A drainage basin is bounded by a drainage divide (across which there is no flow)
almost all the way around its perimeter, except for a small segment which corresponds to the outlet of the basin. The area enclosed by the basin perimeter, as viewed
from above, is variously known as the contributing, drainage, or upstream area. Due
to the treelike structure of river networks, and the nested nature of drainage basins,
there is a contributing area for every pixel in a DEM. This is the area of the region
that contributes flow to the given pixel.
Note
When drainage area is listed as an attribute for a channel link or Strahler stream, the
value refers to the contributing area above, but not including, the downstream node
of the link or Strahler stream.

8-bit, 16-bit, and 24-bit color

RiverTools Users Guide

177

area-altitude plot
From a digital point of view, this is a plot of the total area of all the pixels in a DEM
that have a given elevation value, plotted against the elevation values that are present
in the DEM. The same basic idea can be expressed in an analog way by imagining a
contour plot for a surface, measuring the area between contours, plotting this area as
a function of contour elevation, and letting the contour interval approach zero. These
(or an integrated version of the same idea) are also known as hypsometric plots. You
can create hypsometric plots via the Analyze Entire Grid Area-Altitude Function.

area-distance plot
Similar to an area-altitude plot, this is a plot of the total area of all the pixels in a
DEM (but usually restricted to a particular basin in the DEM) that have a given flow
distance to the basin outlet.

ASCII (American Standard Code for Information Interchange)


(ask-ee)
A rule for mapping text characters to binary numbers between 0 and 127 that was
introduced by a national committee in the early sixties and eventually won out over
IBMs EBCDIC as the industry standard. Nowadays ASCII files are often referred to
as plain text files.

aspect
At each point on a surface, the gradient gives the direction in which the surface height
increases the fastest (and the rate of this increase), as a 2D vector. The opposite direction is the direction in which the height decreases the fastest, and is the direction in
which water will flow away from the given point. The aspect at a given point or pixel
is this flow direction, which is usually specified via the angle that the 2D gradient
vector makes with a fixed x-axis.

aspect ratio
The length-to-width ratio for a geometric shape, usually a rectangle. The aspect ratio
of a square is 1, while the aspect ratio of a golden rectangle is (1 + sqrt(5))/2 = 1.618,
the golden ratio. The golden rectangle was believed to be the most aesthetically
pleasing rectangular shape by the early Greeks. (The front face of the Parthenon in
Athens has this aspect ratio.) Note that the width of an image on a page can be computed from the length and the aspect ratio for the image.

RiverTools Users Guide

area-altitude plot

178

backdrop
In live theater, a backdrop is a scene that is displayed behind the actors. In RiverTools, a backdrop is an image that sets the stage for some other activity, such as the
graphical selection of a basin outlet.

backing store
When working with multiple graphics windows, the window on top will often
obscure other windows below. When one of these lower windows is brought to the
top by clicking on it, it must be redrawn using a stored version of the original image.
This stored version is called backing store. Usually your window system will handle
backing store; if not, you can have IDL do the job via a RiverTools preference.

basin
The flow of water across landscapes is often organized into treelike drainage networks, which gather flow over a broad region and focus it into narrow channels. The
region that contributes flow to (or is drained by) a given river cross-section is called a
basin. This basin is bounded almost all the way around its perimeter by a drainage
divide, across which there is no flow. Basins are basic landscape units that are distinguished by the fact that all of the flow collected in their interior exits the basin across
a relatively narrow segment called the basin outlet. Besides being important to the
flow of water, the activities of biological communities are often restricted or controlled to some extent by basin boundaries.

basin area
See area on page 176.

basin diameter
The size of a basin can be quantified by its area, as well as by its diameter, which is
the maximum distance between any two points on the basin boundary. This is the
maximum linear extent of the basin. The concept of basin shape can be quantified
via a dimensionless number called a shape factor, which is the ratio of the square root
of basin area to basin diameter.

backdrop

RiverTools Users Guide

179

basin info file


In RiverTools, the coarse attributes of a user-extracted basin are stored in a plain text
file called a basin info file. These attributes include area, relief, the coordinates and
elevation of the basins outlet, and several others. This information can be viewed via
the File View Basin Info dialog.

big-endian
See byte order on page 180.

BIL (Byte Interleaved by Line)


A pixel in a raster grid may have one or more values associated with it, which are
often called bands. A raster DEM is an example of a single-band grid, where the
single value is elevation. A color image is an example of a grid with three bands,
namely the red, green, and blue values. A remotely-sensed scene may consist of
many bands, such as a reflectance for each of several wavelengths. One of the ways
to store multi-band data in a single binary file is called byte interleaved by line. For
the example of a color image, the first, second, and third lines in the file would store
the red, green, and blue values for the first line in the scene. Then the fourth, fifth,
and sixth lines in the file would store the red, green, and blue values for the second
line in the scene, and so on. For single-band binary grids, the BIL format is the same
as the row major format. Binary files in BIL format sometimes end in the extension
.bil.

bilinear
An interpolation scheme used for rebinning 2D arrays to a larger size. This is a generalization of linear interpolation for 1D arrays. Intermediate values are determined via
lines drawn between the pixels that have known values. You can choose between this
and another interpolation scheme called nearest neighbor as a Graphics Windows
preference in the File Set Preferences dialog. Bilinear interpolation causes
rebinned images to look smoother, but is to some extent artificial. See nearest neighbor on page 200.

binary file
A non-text file, containing information encoded in bytes. (These files appear as gibberish when viewed with a text editor.) Sometimes binary files are referred to as
unformatted, and text files as formatted. See text file on page 212.

RiverTools Users Guide

basin info file

180

bit (binary digit)


A variable or data unit that can take on either of two distinct possible values, such as
on or off, open or closed, yes or no, true or false, and 0 or 1. Equivalent to a Boolean
or logical variable. Numbers are stored in a computer using base 2 arithmatic and by
setting large numbers of electronic switches to open or closed.

bounding box
A bounding box is the smallest box (in a given coordinate system) that completely
encloses a given DEM. The corner coordinates of this box are given in decimal
degrees latitude and longitude for DEMs with fixed-angle pixels, and in this case the
edges of the bounding box coincide with the edges of the DEM. For DEMs with
fixed-length pixels they are given in UTM coordinates, and the edges of the bounding
box will touch but not coincide with the edges of the DEM.

brightness matrix
See shaded relief on page 207.

byte
A unit of data equal to 8 bits, and hence capable of storing any one of 28 = 256 distinct values. The yardstick by which file size is measured. See byte order on
page 180 and byte type on page 181.

byte order
There are two different conventions that are used for storing multi-byte integers on
computers, known as big-endian (or MSB, or network byte order) and little-endian
(or LSB, or host byte order). For the big-endian order, multi-byte integers are stored
in memory beginning with the most significant byte (MSB), while for little-endian
order the least significant byte (LSB) is stored first. This issue becomes important
when binary files that contain multi-byte integers are generated on one type of computer, and then ported to another type of computer (from a different vendor) that uses
the opposite byte order convention. RiverTools grid files, such as DEMs, are an
example of such a file. Saving grids (like DEMs) as native binary files is much more
efficient in terms of access speed and file storage space than any other file format, but
it means you may have to swap the byte order of a grid that was generated on a different machine before you can use it on your machine. You can easily do this via the
Prepare Convert Grid dialog; there is a Swap byte order option in the Function
droplist. (If you answer Yes to the option to display mock-ups of the before and after

bit (binary digit)

RiverTools Users Guide

181

DEMs, you can quickly learn how to assess byte order visually from a density plot.)
For more information, please read the section called Top 10 Things You Should
Know About DEMs on page 28.

byte type
This is a standard data type which can store any (unsigned) integer between 0 and
255. Each element in a byte array requires 1 byte of RAM. Numbers ending in b
(like 42b) denote byte-type integers. See integer type, long type, float type and double type (or double precision).

CDF (Cumulative Distribution Function)


This is a term from probability and statistics and refers to a function that gives the
probability that a measurement (being viewed abstractly as a random variable) will
take a value that is less than or equal to any given value. If xmin and xmax are the
min and max values that the measurement can possibly take, and if x is a value in this
range, then F(x) (the CDF) is a function of x that gives the probability that a new
measurement will be less than or equal to x. Note that F(xmin)=0 and F(xmax)=1.
Any nondecreasing function that ramps up from 0 to 1 over some range can be a
CDF, and different types of measurements typically have different CDFs. For example, human heights and lifetimes are measurements that each have some distribution
of possible values, and these distributions can be summarized by CDFs. Sometimes
CDFs can be computed from a theoretical argument, but often they must be determined empirically from measurements for a large sample. The derivative of F(x) is
known as the probability density function or pdf. RiverTools can compute empirical
CDFs for a variety of different measurements that can be made for channel links and
Strahler streams. See the routines: Analyze Strahler Streams Stream CDFs,
and Analyze Channel Links Link CDFs. These routines also allow you to
compare CDFs for different populations. See Kolmogorov-Smirnov (K-S) 2-sample
test, and the RiverTools CDF (Cumulative Distribution Function).

channel
In RiverTools, this word is used as a generic term for a segment of a river. Another
such term is reach. Links and Strahler streams are types of channel segments that
have more specialized definitions.

channel links
See link on page 196.

RiverTools Users Guide

byte type

182

channel profile
See longitudinal profile on page 197.

closed basins
While the water collected by most river basins ultimately drains to the sea, a closed
basin is a basin that drains to a point or water body that is surrounded by land. The
Basin and Range region of the United States is an example of a very large closed
basin.

color schemes
Many computer monitors (especially older ones) are only capable of displaying 256
distinct colors at any given time. On these monitors, the color of each pixel is stored
as a number between 0 and 255 (which requires 8 bits in memory), and the current
color table maps these numbers to 256 distinct colors. Changing the color table
causes the same numerical values to be mapped to a new set of 256 colors, but whatever colors are currently being displayed, there can only be 256 of them. The number
of colors that can be displayed simultaneously can be increased by using more bits of
memory for the value of each pixel. Since computers usually work with 8-bit units
called bytes, newer monitors offer 16-bit, 24-bit, or 32-bit color (2, 3, or 4 bytes).
Under 16-bit and 24-bit color, a monitor can display 216 = 65,536 or 224 = 16,777,216
different colors at once.

color table
A color table is a type of lookup table whereby numerical values are mapped to colors. Under an 8-bit color scheme, for example, the numbers 0 through 255 are
mapped to 256 distinct colors. See 8-bit, 16-bit, and 24-bit color on page 176.

compass angle
This is a nonstandard term that is used in certain RiverTools dialogs where the location of a light source or observer must be specified relative to a scene that is being
viewed. This term was chosen because most people are familiar with a compass, and
can easily imagine the angle that some distant object, like a mountain, makes with the
direction of due east. (Measured counter-clockwise from due east, like in high-school
geometry.) See zenith angle on page 217.

complete stream
See Strahler order on page 209.
channel profile

RiverTools Users Guide

183

compression
Large files often contain enough redundancy that clever compression algorithms can
encode the same data in a form that uses up less memory and can be transmitted more
quickly. You can save a lot of space on your hard disk by compressing large RiverTools data sets that you wish to archive but arent actively using. You can compress
and uncompress files with the Gzip algorithm via the Prepare Gzip File and Prepare UnGzip File dialogs.

compound extension
RiverTools uses many different file name extensions to identify and manage the files
that it creates and works with. An example is _DEM.rtg, which is the extension
used for a RiverTools DEM grid. The letters DEM between the underscore and the
dot are the first part of the extension, and describe the type of grid. The letters rtg
after the dot are the second part of the extension and stand for RiverTools Grid. Normally, the term extension refers to this second part. This kind of two-part extension is
called a compound extension in RiverTools.

contour plot
A contour curve or level curve is formed by the intersection of a horizontal plane
with a given surface; it is a curve of constant height. A contour plot typically consists
of several such curves, with the heights of different curves differing by a fixed contour interval. You can create a contour plot via the Display Contour Plot dialog.

contributing area
See area on page 176.

crop
As a verb, crop means to trim or cut off the edges. If a DEM has a margin of nodata
values on one or more edges, it may be desirable to create a new DEM in which these
values have been cropped off. Automatic cropping is one of the functions offered in
the Prepare Convert Grid dialog.

cross section
In the context of rivers, this phrase refers to the intersection of a plane that is perpendicular to the primary, downstream direction of flow, with a given channel segment.
See discharge on page 186 and velocity on page 216.

RiverTools Users Guide

compression

184

data set
In RiverTools, this phrase refers to a collection of files that are all related to one
another. Typically, they are all related to, or were derived from a given DEM. It is a
good idea to store different RiverTools data sets in different directories.

data type
Standard data types include byte, integer, long, float, double and complex. Each of
these data types requires a certain amount of RAM per element, and is capable of
storing numbers in some range. Another data type is string, which is basically an
array of byte type that can be used to store text.

delimiter
A text character that marks the beginning and/or end of a unit of data or separates different data components. For example, periods are used as delimiters in domain
names, hyphens and parentheses are used in phone numbers and social security numbers, and blank spaces and commas are used in written text.

DEM (Digital Elevation Model)


A DEM is a 2D array where each element in the array gives the average elevation of
a small, four-sided patch of terrain. These little patches typically have dimensions
that are given by either a fixed angular measure or a fixed length. In USGS 1-Degree
DEMs, for example, each element contains the average elevation for a region that is 3
arcseconds on a side. Along a line of longitude on Earth, 3 arcseconds corresponds to
a fixed length of about 92.6 meters, while the length of 3 arcseconds along a line of
latitude depends on the latitude and is given by (92.6 x cos[pi/180 * LAT]), where
LAT is the latitude in decimal degrees. USGS 7.5-Minute DEMs provide an example
of a DEM where each element corresponds to a square region that is 30 meters on a
side.

density plot
Given a two-dimensional array of numbers that range between some min and max
value, a density plot is an image in which each number or range of numbers in the
array is assigned a different color. This is really just the familiar color-by-number
concept. RiverTools grids, such as DEMs, flow grids, flow distance grids, and area
grids can all be displayed as density plots via the Display Density Plot dialog.

data set

RiverTools Users Guide

185

depressions
See minima on page 199.

depth
In the context of river networks, this term usually refers to the average depth of water
at a given river cross-section under specified conditions, such as bankfull depth.

dialog (or dialog box)


Software programs that have a graphical user interface (GUI) often solicit input from
the user via a window that asks questions or offers choices. These dialog boxes often
consist of buttons, droplists, menus, sliders, or small boxes for entering text. Notice
that this really is a dialog in the familiar sense; it is a discussion whereby you and
the program communicate with one another.

diameter
In mathematics, the word diameter is often used to refer to the maximum size of
some kind of object. For bounded shapes, the diameter is defined to be the maximum
distance between any two points on the boundary of the shape. The diameter of a circle and a square are familiar examples. For a rooted tree graph, the diameter refers to
the maximum distance, as measured in links, from any exterior link to the root. In
RiverTools, tree diameter is measured for every link in an extracted network and is
referred to as network diameter. See basin diameter on page 178.

digital dam
Valleys that are narrower than the DEM pixel size cannot be resolved in a DEM and
artificial dams often appear at these locations. The network extraction algorithm in
RiverTools must distinguish these from real ridges in order to create a flow grid. See
Top 10 Things You Should Know About DEMs on page 28.

directory
On a computer, different types of data are stored as files, each of which is identified
by its own name. Directories are a mechanism by which your computers operating
system allows you to store related files together as a set. Any directory can contain
both files and child directories. A hierarchy of directories can be conceptualized as
a tree, with the topmost directory being called the root directory. There is a close

RiverTools Users Guide

depressions

186

analogy between a file cabinet and a hard disk, where drawers and folders are similar
to directories, while individual documents, photos, and so on are similar to files. See
working directory on page 216.

discharge
The volume of water (or sediment) that crosses a given channel cross-section in a unit
interval of time. The discharge from a basin is the instantaneous rate at which water is
flowing out of the basin through its outlet. This variable is traditionally denoted as
Q. Related quantities are the mean annual discharge and the bankfull discharge
which are both self-explanatory. Unit-width discharge is the discharge per unit
width in the cross-stream direction.

double type (or double precision)


This is a standard data type, in which real-valued numbers are represented in scientific notation. Each element in a double array requires 8 bytes of RAM, which are
shared between the mantissa and exponent. The range of numbers that can be stored
is machine- specific and depends on how the 8 bytes are shared. This information can
be returned by setting the DOUBLE keyword to IDLs MACHAR function. See byte
type, integer type, long type, and float type.

drainage area
See area on page 176.

drainage density
This is the ratio of the total length of all channels in a given basin (according to some
agreed-upon definition of channel) to the drainage area of the same basin. This number describes how densely a basin is channelized and has units of inverse length.
Drainage density has been observed to vary with other quantities like mean annual
rainrate and regional geology.

drainage divide
A given river basin is bounded almost all the way around its perimeter by a drainage
divide, across which there is no flow. Flow leaves a basin across a relatively narrow
part of its boundary known as the basin outlet. The Continental Divide, which is a
line running roughly north-south through the Rocky Mountains, is one of the major
drainage divides in North America. Rain falling to the east of this line eventually
drains to the Atlantic Ocean, while rain falling to the west drains to the Pacific
Ocean.
discharge

RiverTools Users Guide

187

drop
The difference in elevation between the upstream and downstream ends of any channel segment. The link drop is the drop across a given link, while the stream drop is
the drop across a given Strahler stream. The drop in the elevation of the free water
surface (as opposed to the bed) can be called the free-surface drop.

DTM (Digital Terrain Model)


DTMs are the same as DEMs. See DEM (Digital Elevation Model) on page 184.

edge basins
This is an option in the Extract Mask Subbasin Mask dialog that creates a
mask by treating every pixel on one of the four edges of the DEM as the outlet of a
subbasin.

extension
Filenames often end with a period followed by additional characters known as the file
extension. An extension is generally a standard abbreviation for a type of file. For
example, .txt is often used for ASCII files, and .ps for PostScript files. RiverTools
grid files have the extension .rtg, and grid info files have the extension .rti. A RiverTools extension rule is a mapping of file types to extensions. You can view a list of
all the different compound extensions that RiverTools uses by opening the Edit Filename Info dialog in the File menu and selecting a file type from the Type of file
droplist; the corresponding extension will appear in the text box to the right. See
compound extension on page 183.

exterior links
Exterior links begin with a source at their upstream end and terminate in a junction at
their downstream end. Exterior links are the same as Strahler streams that have order
1, and are special in the sense that they lie at the transition from unchannelized flow
over hillslopes to channelized flow. See source, junction, link, and Strahler stream.

file format
See format (or file format) on page 190

RiverTools Users Guide

drop

188

fixed-angle pixels
DEMs typically have one of two pixel geometries, which are referred to in RiverTools as fixed-angle and fixed-length. In the case of fixed-angle pixels, the xsize
and ysize of every pixel is given in terms of a fixed, angular measure. However, the
actual xsize and ysize for such pixels, as measured in meters, will vary with latitude.
For example, USGS 1-Degree DEMs have 3-arcsecond pixels. See arcsecond on
page 176 and fixed-length pixels on page 188.

fixed-length pixels
DEMs typically have one of two pixel geometries, which are referred to in RiverTools as fixed-angle and fixed-length. For DEMs with fixed-length pixels, the
xsize and ysize of each pixel corresponds to some fixed length, as measured in
meters. For example, USGS 7.5-minute DEMs have 30-meter pixels. See fixedangle pixels on page 188.

fixed-width font
Some fonts have the special property that each character in the font has exactly the
same width. These fonts are especially useful for presenting data in a table, because
they make columns and numbers easy to align. Courier is an example of a widely
available fixed-width font. You can specify the fixed-width font that you want RiverTools to use for displaying tabular data as a General preference in the File Set
Preferences dialog. Note that on UNIX systems, the word fixed is usually mapped
to a locally available fixed-width font.

flats
Flow direction is ambiguous when none of a pixels eight neighbor pixels has a lower
elevation than it does. It often happens, however, that one or more of a pixels lowest neighbors have the same elevation as it does (within measurement accuracy), and
this at least constrains the possible flow directions for the pixel. Single pixels or collections of pixels with this property are referred to as flats. Since flats are common,
RiverTools uses sophisticated algorithms to assign flow directions within flats in a
self- consistent, iterative way. You should be aware, however, that complete accuracy
is not possible in this situation without additional information. See flow grid on
page 189.

fixed-angle pixels

RiverTools Users Guide

189

float type
This is a standard data type, in which real-valued numbers are represented in scientific notation. Each element in a float array requires 4 bytes of RAM, which are
shared between the mantissa and exponent. The range of numbers that can be stored
is machine- specific and depends on how the 4 bytes are shared. This information can
be returned by IDLs MACHAR function. See byte type, integer type, long type, and
double type (or double precision).

flood image
This is one of the RiverTools Window Tools. It lets you see what would happen if the
region covered by your DEM were to be flooded with water. The water level begins
at the minimum elevation value in the DEM and is gradually raised to a user-determined value. All pixels with elevation less that the water elevation have their color
changed to blue. This tool often gives you insight into the topography of a region that
is more difficult to get from other types of plots. Window tools are available for windows that have a menu bar across the top with a button labeled Tools. Click on this
button to get a list of tools, and select Flood Image.

flow distance
In RiverTools, this phrase refers to the along-channel distance from a given channel
cross-section (or pixel) to one of the following: (1) one of the four edges of the DEM,
(2) the ocean, or (3) the land-locked terminus of a closed basin. You can create a
flow distance grid via the Extract D8-based Grid Flow Distance dialog, and
then you can make an interesting image with this grid by selecting it in the Display
Density Plot routine. Be sure to try the Cycle plotting colors option.

flow codes
See flow grid on page 189.

flow grid
RiverTools uses a DEM to determine the direction of flow from every pixel in the
DEM to one of its eight neighbor pixels. This information is stored in a grid that has
the same dimensions as the DEM. Each element in this grid contains a flow code
that is numerical stand-in for one of the eight primary compass directions. In a RiverTools flow grid, the directions [NE, E, SE, S, SW, W, NW, N] are mapped to the flow
codes [1, 2, 4, 8, 16, 32, 64, 128]. You can create a RiverTools flow grid by using the
Flow Grid dialog in the Extract menu. You can also import a flow grid from another

RiverTools Users Guide

float type

190

source into RiverTools by converting the flow codes via the Prepare Convert
Flow Grid dialog. A flow grid will not be entirely accurate unless: (1) the DEM is
accurate, and (2) the drainage divide for the basin of interest is completely contained
within the DEM. Also note that while RiverTools will use available information to
assign reasonable flow directions within flats, these flow directions may not be completely accurate. These issues are discussed further in the section called Extracting
Drainage Networks from DEMs on page 40.

format (or file format)


This refers to the way in which data is organized in a file. The same data, whether it is
an image, a DEM, some text, or whatever, can be stored in a wide variety of different
ways. For example, some of the common formats for storing color images are GIF,
TIFF, JPEG, and PICT. Data stored as human-readable text is often called formatted
data, while data stored in computer-readable form as binary numbers is called binary
or unformatted data.

FTP (File Transfer Protocol)


One of the first-developed Internet services, a simple UNIX program which allows
users to transfer files over a network from one computer to another. Many FTP servers allow you to download files without having an account on the machine, by using
anonymous or ftp for a user name and your e-mail address as a password. This is a
major means of distributing software and info on the Internet. FTP can also handle
binary files, but must first be put in binary mode by typing bin at the FTP prompt.

full-resolution zoom
This is one of the RiverTools Window Tools. A given graphics window often displays
an image at reduced resolution, since the size of the image is often larger than the size
of the computer screen. This tool lets you click on a pixel and see a full-resolution
density plot of the DEM in the vicinity of the pixel you clicked on.

generators
A tree graph can be described to a large extent by a square (lower-triangular) matrix
of numbers called generators. This matrix is called a side tributary matrix or generator matrix. These numbers give the number of side tributaries (of each Strahler
order) that a Strahler stream of a given order will have, on average. For any self-similar tree graph, the generator matrix has constant values along its diagonals. See selfsimilar tree model (SST) on page 206 and side tributary matrix on page 207.

format (or file format)

RiverTools Users Guide

191

GeoTIFF
A variant of the TIFF image format that is used to store geographical data, such as
DEMs.

GIF (Graphics Interchange Format)


A standard color image format commonly encountered on the Internet. Other common formats are TIFF, PICT, and JPEG. The standard extension for these files is .gif.

gradient
See aspect on page 177.

grid
This is another name for a 2D array or matrix in which each element contains some
kind of descriptive information (as a number) for a corresponding region on the surface of the Earth. Since images are stored in a computer as grids, the elements of a
grid are sometimes referred to as pixels. The adjective gridded is a synonym for raster. See grid file, pixel and raster.

grid info file


In RiverTools, this phrase is used as a synonym for the RiverTools Info (RTI) file in a
given data set. This is a plain text file that describes the attributes of a DEM in the
same data set. The file extension for the info file is .rti and the extension for the
DEM that it describes is _DEM.rtg.

grid file
RiverTools is able to create other grids for the single raster input of a gridded DEM.
This is done with dialogs under Extract Grid. Each of these grids is a 2D array
that has the same dimensions and pixel geometry as the original DEM, although they
may have a different data type. Since these arrays can take a long time to extract, they
are stored in files known as grid files. Grid file names end with compound extensions
like _area.rtg and _slope.rtg. The last part of the extension, .rtg, stands for RiverTools Grid. See compound extension on page 183.

GTOPO30
A collection of DEMs created by the National Geophysical Data Center (NGDC) that
cover the Earth at a fixed-angle pixel size of 30 arcseconds.

RiverTools Users Guide

GeoTIFF

192

GUI (Graphical User Interface)


A point-and-click user interface, where a mouse is used to position a cursor over
objects displayed on the monitor and selections are made by clicking. See interface
on page 194.

Hacks law
In a classic study, Hack (1957) created log-log plots of the length of the longest channel in a basin, L, vs. the basin area, A. He discovered that L and A were related
through the power-law formula L = c Ab, where the exponent b was always near 0.6
rather than equal to 0.5, as might be expected from a cursory dimensional analysis.
There have been many efforts to explain this result, including the basin lengthening
idea (proposed by Hack) that larger basins are disproportionately narrower than
smaller basins, and the fractal channel idea (proposed by Mandelbrot). Another possible explanation is that channel sinuosity increases in the downstream direction (and
with increasing basin area). Preliminary results from RiverTools suggest that this
may be the explanation in many cases. RiverTools has a variety of tools that allow
you to confirm and explore this result for yourself, using your own data. In particular,
see Analyze Subbasins Shape Plots on page 132 and Analyze Channel
Links X vs. Y Plot on page 129.

header
Many files contain information at the beginning which describes the files contents,
provides documentation, etc. called a header. This is especially true for files that contain data. Similar information at the end of a file is called a trailer.

histogram
A histogram is a plot that shows how frequently different values occur in a given set
of values. The range of observed values is divided into bins, and then each data value
is placed in the appropriate bin. The histogram shows a count of how many values
there are in each bin.

Horton plot
See stream ratios on page 210.

GUI (Graphical User Interface)

RiverTools Users Guide

193

Hortons laws
In classic papers, Horton (1932, 1945) introduced a stream ordering concept that
allows the channels in a river network to be assigned an integer value that determines
their relative importance in a hierarchy of major and minor tributaries. (An improved
version of this concept was later introduced by Strahler(1957).) Horton noticed that
the number of streams of each order almost always grew in a geometric progression,
something like 1, 4, 16, 64, .... In addition, he noticed that the average length of
streams, when grouped by order, also grew in a geometric progression, increasing
roughly by a factor of two from one order to the next higher order. These and similar
results for other measurements like basin area are now known as Hortons laws, and
the factor by which the values grow is known as the stream ratio for the given measurement. You can create Horton plots with the Analyze Strahler Streams
Horton Plots dialog and explore these trends for yourself. Many river network models have been proposed in an effort to explain Hortons laws. The self-similar tree
model has allowed these laws to be understood as a consequence of the self-similar
branching structure of river networks. See Recommended Reading on page 64 for
references on the self-similar tree model. See self-similar tree model (SST) on
page 206 and side tributary matrix on page 207.

HTML (HyperText Markup Language)


A very simple text formatting language that most documents on the world wide web
are written in. Browsers format web pages by using the text and formatting instructions that are contained in HTML documents.

hydrograph
A plot of the discharge across a particular river cross-section as a function of time.
One is typically interested in the hydrograph for a period of time in which the basin
upstream of the cross-section has experienced a storm event. This is also known as
the hydrologic response of the basin to the storm event.

IDL (Interactive Data Language)


A powerful, array-based computer language and the flagship product of Research
Systems, Inc. (RSI). RiverTools is written entirely in IDL and is a product of Rivix,
LLC. RiverTools and IDL can be used together to create a very flexible computing
environment that provides you with the convenience of a point-and-click application
as well as access to all the low-level RiverTools commands and all the commands in
the IDL language. This facilitates batch processing and also allows you to extend

RiverTools Users Guide

Hortons laws

194

RiverTools by writing your own scripts and adding them to the RiverTools User
menu. See the section called Adding Extensions in Chapter 1. IDL must be purchased
separately from RSI.

info file
See grid info file on page 191.

integer type
This is a standard data type which can store any (signed) integer between -(215) and
(215 - 1). (2 15 = 32768) Each element in an integer array requires 2 bytes of RAM.
See byte type, long type, float type and double type (or double precision).

interface
The manner in which a user provides information to a computer program. Examples
are command-line, menu-driven, and mouse-driven. See GUI (Graphical User Interface) on page 192.

interior link
Interior links are bounded by junctions at both their upstream and downstream ends.
Interior links are the same as links that have a Strahler order greater than 1. See junction, link, exterior links, and Strahler order.

IUH (Instantaneous Unit Hydrograph)


The idealized theoretical hydrograph (or basin response) that would result from an
instantaneous rain storm of unit intensity throughout the basin.

JPEG (Joint Photographics Expert Group)


A standard (compressed) format for color images, common on the Internet. JPEG
images tend to be smaller files than GIF images, because JPEG is a lossy format
that doesnt necessarily retain all of the information in the original image. Standard
extensions for JPEG files are .jpg and .jpeg.

junction
This refers to the point where two rivers flow together, also known as a confluence.
Interior links are bounded on both ends by junctions, while exterior links begin at a
source on the upstream and end at a junction on the downstream end.

info file

RiverTools Users Guide

195

Kolmogorov-Smirnov (K-S) 2-sample test


This is a statistical test which is used for comparing two empirical CDFs. It was
designed to test the likelihood that two sets of measurements were drawn from the
same probability distribution. It does this by looking at the maximum separation
between two empirical CDFs, D, and comparing this number to a distribution-free
theoretical result that corrects for the possibly-different sample sizes. Tables for the
K-S test statistic give the probability that a separation of a given size would be
observed if the same-distribution hypothesis were true. This test is provided as an
option in some RiverTools routines, such as the Analyze Strahler Streams
Stream CDFs routine.
The distribution of the Kolmogorov-Smirnov test statistic, D, depends on the two
sample sizes, say n and m. However, as n and m become moderately large (greater
than about 40), the distribution of the normalized test statistic <D> = D * sqrt(n m /
(n+m)) approaches a limiting distribution that is independent of n and m. Tables for
this limiting distribution are widely available and contain values for p and dp, which
are defined through the equation Prob(<D> > dp) = p. Observe that dp is the pth quantile of the random variable <D> . Some benchmark values of (dp, p) pairs are given
by (1.224, 0.10), (1.358, 0.05), (1.517, 0.02), (1.628, 0.01), (1.858, 0.002), (1.950,
0.001). This means that if the two samples really have the same distribution, then the
odds of <D> being greater than 1.224 are 1 in 10, while the odds of it being greater
than 1.950 are only 1 in 1000. The statistic <D> is included as an inset in some of the
empirical CDF plots created by RiverTools.

lat/lon code
Currently, the tool for patching together USGS 1-Degree DEMs uses a lat/lon code
that consists of a 2-digit latitude followed by a 3-digit longitude. (2-digit longitudes
are padded with a preceding zero.) The lat and lon in question refer to the southeast
corner of the DEM. Examples of valid lat/lon codes are 36111 and 36095. The longitudes in this situation are measured west of the prime meridian, and would be given
as negative values elsewhere in RiverTools.

LCF (Link Concentration Function)


This gives the number of links in a basin as a function of elevation. You can create an
LCF plot via the Analyze Channel Links Link Conc. Fcn. dialog.

light source vector


See observer vector on page 200.

RiverTools Users Guide

Kolmogorov-Smirnov (K-S) 2-sample test

196

line profile
This is a plot of the elevations of points (or pixels) along a line segment, as a function
of distance along the line segment. You can view these profiles by (1) creating an
image with one of the tools in the Display menu, (2) clicking on the Window Tools
button in the upper left corner of the resulting graphics window, (3) selecting Line
Profile from the droplist of window Tools, and (4) clicking on a pixel in the image.
See longitudinal profile on page 197.

lines
In the jargon of remote sensing and image processing, lines is a synonym for rows,
while samples is a synonym for columns.

link
A link is a channel segment that has a junction on one end and either a junction,
source, or outlet on the other end. A river network can be thought of as being built out
of a large number of links. See exterior links on page 187 and interior link on
page 194.

linkfile
Each link in a river network has a number of attributes that RiverTools measures
when you run the Extract 4. River Network routine. The attributes of all of the
links in a given river network are stored in a vector-formatted file called a RiverTools
linkfile.

links per stream


Every Strahler stream is composed of one or more links, so the number of links per
stream is a Strahler stream attribute.

Linux
A shareware implementation of the UNIX operating system for use with PCs. Linux
was originally created by Linus Torvald, but has evolved into a cooperative effort by
people around the world.

little-endian
See byte order on page 180.

line profile

RiverTools Users Guide

197

log window
When you start RiverTools, you will see the RiverTools menu bar in the upper left
corner of your screen, and a resizeable window with a startup message in the lower
left corner. This is the RiverTools Output Log window, where informational messages are frequently displayed. You can move and resize this window according to
taste, and then save this information as a preference via the File Set Preferences
dialog.

long type
This is a standard data type which can store any (signed) integer between -(231) and
(231 - 1). (231 = 2,147,483,647). Each element in a long array requires 4 bytes of
RAM. Numbers ending in L (like 33000L) denote long integers. The absolute
index of an element in an IDL array is stored as a long integer. See byte type, integer
type, float type and double type (or double precision).

longest channel length


Any pixel in a DEM can be viewed as the outlet of a basin. Because river networks
are treelike, there will typically be many channels that flow from upstream locations
to this outlet. One of these channels will be longer than all of the others, and its length
is known as the longest channel length. It is often interesting to compare this measurement to the basin diameter for the basin that has the same outlet. Sometimes the
longest channel is referred to as the main channel.

longitudinal profile
This is a plot of the elevations of points (or pixels) along a streamline, as a function of
distance along the streamline. For river networks, longitudinal profiles are typically
upward concave. You can view these profiles by (1) creating an image with one of
the tools in the Display menu, (2) clicking on the Tools button in the upper left corner
of the resulting graphics window, (3) selecting Channel Profile from the droplist of
Window Tools, and (4) clicking on a pixel in the image. Compare to line profile.

LSB (Least Significant Byte)


See byte order on page 180.

RiverTools Users Guide

log window

198

max RAM block size


When working with large data files, the size of the file may be larger than the amount
of RAM that is available on your computer. RiverTools was designed to deal with this
situation by reading, writing, or processing the data in the file in smaller blocks that
will fit into RAM. You can specify the maximum size of these blocks via a General
preference in the File Set Preferences dialog. Note that the default value is on the
small side, so you can increase processing efficiency somewhat by increasing this
number to something like half of your available RAM.

magnitude
The number of channels in a given river network or subnetwork that have a Strahler
order of one is also known as the magnitude of the network. Since the upstream end
of each order 1 stream is a source, this is also the number of sources. Viewing the network as a rooted tree graph, this is just the number of leaves. See Strahler order on
page 209.

main channel length


See longest channel length on page 197.

mask (and RiverTools mask)


A standard mask is a 2D array in which the pixels (or elements) being masked are
assigned a value which differs from the value of unmasked pixels. When working
with large grids, however, these files can be enormous and storing several different
masks would require a large amount of hard disk space. A RiverTools mask (stored in
a RiverTools mask file) contains only the IDs for the pixels that are masked, which
saves file space. Several masked regions can be stored in one such file; the long integer -1L is used as a delimiter between groups of IDs that define different regions.
Each such group of pixels is called a mask cell. These cells might correspond to different subbasins, for example. The standard filename extension for RiverTools mask
files is .rtm. There are several routines in the Extract Mask menu for creating
RiverTools mask files, and others are created automatically by the Extract Flow
Grid routine. You can view an image of a RiverTools mask with the Masked Region
dialog in the Display menu. See minima on page 199.

max RAM block size

RiverTools Users Guide

199

minima
The minima of a surface are the low points or depressions, which in a DEM may
involve one or more pixels. In order to create a flow grid from a DEM, RiverTools
must first create a depressionless DEM by filling depressions in the original. This is
done by the Extract Flow Grid routine. This routine also creates two RiverTools
mask files, one for the original depressions, and one for the filled depressions. These
can be viewed with the Display Masked Region routine.

min valid elevation


In RiverTools, you can set a threshold called the min valid elevation such that all
elevation values below this threshold will be treated as if they are not valid data. You
can set this threshold as a General preference in the File Set Preferences dialog.
The default is 1. Some RiverTools routines, such as the Analyze Entire Grid
Area-Altitude routine, will ignore values less than this in their computations.

mock-up
In RiverTools, an image created from gridded data that uses less than the full resolution of the data. Something between a thumbnail image and a full-sized image.

mosaicking
See patching on page 201.

MSB (Most Significant Byte)


See byte order on page 180.

multi-layer plot
In RiverTools, you can create plots that consist of multiple layers. An example would
be a contour plot overlaid on a shaded relief image. You can create such a plot with
the Multi-Layer Plot dialog in the Display menu. For more information, see Saving
Graphics Windows as Images on page 55.

NaN
Machines which implement the IEEE standard for binary floating-point arithmetic
have two special values for undefined results: NaN (Not A Number) and Infinity.
Infinity results when a result is larger than the largest representation. NaN is the
result of an undefined computation such as zero divided by zero, taking the square-

RiverTools Users Guide

minima

200

root of a negative number, or the logarithm of a non-positive number. In many cases,


when IDL encounters the value NaN in a data set, it treats it as missing data. The
special values NaN and Infinity are also accessible in IDLs read-only system variable !VALUES.

nearest neighbor
A scheme by which a 2D array is rebinned to a larger size by pixel replication.. If
the scale factor is n, then each element in the original array will give rise to an (n x n)
subarray in the new array, and each element in this subarray will have the same value.

NIMA (National Imagery and Mapping Agency)


Formerly the Defense Mapping Agency (DMA), and the agency that distributes
DTED elevation data.

nodata value
A nodata value is an agreed-upon value that is used as a placeholder in data arrays at
locations where data is not available. A nodata value should lie outside of the range
of acceptable data values, and often the value -9999 or 0 can be used. See min valid
elevation on page 199.

observer vector
The position of an observer relative to an object that is being viewed can be described
as a vector from the object to the observer. This vector is given in a coordinate system
that is centered on the object. Similarly, the light source vector is a vector from the
object to a light source.

operating system (OS)


Low-level software that performs a variety of basic functions such as: copying, deleting, and renaming files; creating, deleting, and listing directories; memory management; connecting to networks; etc. that must be running before any other software
can be used. On PCs, the operating system is typically some version of Microsofts
Windows program (such as Windows 3.*, Windows 95, Windows 98, or Windows
NT) or Linux, a free version of UNIX for PCs. On workstations, the OS is typically a
vendor-specific variant of UNIX, such HP-UX (HP), SunOS (Sun), Ultrix (DEC),
IRIX (SGI), or AIX (IBM). Apple computers use the MacOS operating system.

nearest neighbor

RiverTools Users Guide

201

outlet
That (relatively narrow) section along the boundary of a basin across which water
and sediment collected by the channels in the basin may exit the basin. Basins are
defined by the location of their outlet, and by definition have a single outlet. See
basin on page 178 and drainage divide on page 186.

patching
In RiverTools, this is used as a synonym for mosaicking. Typically, when gridded
data is available for a large region, such as a country or the entire Earth, it is inconvenient to store all of this data in a single file. This file would simply be too big to work
with effectively. Because of this, data for large regions is usually partitioned among
many separate files. For example, digital elevation data is available for the entire U.S.
at a pixel size of 3 arcseconds, but this data has been partitioned such that each file
contains the elevation data for a 1 degree latitude by 1 degree longitude region. Since
it is rare for a region of interest (such as a basin) to be wholly contained in the region
covered by a single file, it is typically necessary to create a new data file for the
region of interest by reading portions of several different files and patching these
together. It is usually best if this file is no larger than necessary to cover the region of
interest, since larger regions require more hard disk space and more processing time.
RiverTools 2.0 has several graphical tools in the Prepare menu for patching together
DEMs, such as Patch Fixed-Angle DEMs, and USGS 1-Deg. DEMs Patch Several.
Note
When patching DEMs to cover a basin of interest, the region should be chosen large
enough so that the drainage divide for the basin is fully contained within the new
DEM; otherwise it is likely that RiverTools will compute flow directions incorrectly.

permissions
The UNIX environment allows multiple users to share the same disk space and other
resources. In order to provide privacy in this setting, each file has a permissions status that defines who is allowed to read, write, or execute that file. A file may be
accessible to (1) only the owner, (2) a specific group of users, or (3 all users. This status is set by the files owner using the chmod command. Sometimes users will be
unable to read from or write to a file (or directory) in a RiverTools data set because
they dont have permission.

RiverTools Users Guide

outlet

202

pits
In RiverTools, this refers to any depression in a DEM. A pixel in a DEM, such that all
eight of its neighbor pixels have a higher elevation than it does, is called a singlepixel pit. A set of connected pixels in a DEM, such that each pixel on the boundary of
this set has a higher elevation than that of any pixel in the set, is known as a multipixel pit.

pixel
This word is derived from the phrase picture element. Since images or pictures are
stored as 2D arrays on a computer, this word is sometimes used more generally to
refer to the elements of a 2D array. See grid on page 191 and raster on page 204.

pixel geometry
See fixed-angle pixels on page 188 and fixed-length pixels on page 188.

pixel ID
Each pixel in a 2D array (or DEM) can be assigned a unique ID by numbering the
pixels sequentially in calendar fashion, starting in the first column of the first row.

platform
Used when referring to differences in the hardware and low-level software used by
different computers. These differences often have to do with the different conventions and technology used by different vendors. Ideally, one would like software to be
platform- independent.

PostScript
A language introduced by Adobe for the precise description of pages that are to be
sent to a printer. PostScript has become an industry standard. The main advantage of
PostScript is that it provides vector-based as well as raster-based descriptions of
objects on the page, allowing them to be rescaled by arbitrary factors without distortion or degradation. Many people have never seen raw PostScript code, since most
word processors automatically display the pages that are described by the PostScript,
rather than the code itself. You can view this code by opening a PostScript (.ps) file as
text, which is the default for simple text editors. The code is plain ASCII text and can
be e-mailed. You can save almost any graphic that you create with RiverTools as
explained in the section called Saving Graphics as PostScript on page 53.

pits

RiverTools Users Guide

203

prefix
In RiverTools, filenames are constructed from two parts, a prefix and an extension.
RiverTools distinguishes between two different types of prefix. A data set prefix is
used to identify files that are associated with a particular DEM, while a basin prefix
is used to identify files that are associated with a particular basin in a DEM. See
extension on page 187.

profile
See line profile on page 196 and longitudinal profile on page 197.

projection
Map projections are schemes for displaying the surface of a spherical planet on a flat
sheet of paper. This always results in some kind of distortion, but different schemes
cause different regions or measurements to be distorted differently. For small regions,
the distortion is usually very slight, because a planar approximation works better for a
small region. Many of the images that are created by dialogs in the Display menu can
be displayed using different map projections. You change the map projection with the
Display Map Projection Info dialog.

pruning method / threshold


There is no universal agreement as to how the heads of first-order channels (known
as sources) can best be identified from a DEM and/or a flow grid. This is still an
active area of research that RiverTools may help to resolve. However, many different
approaches have been proposed and are in common use. In RiverTools, these are
referred to as pruning methods, and the user is offered a variety of choices. Most
pruning methods require the specification of a threshold, with the idea that channelized flow does not usually occur below this threshold.

RAM (Random Access Memory)


A computers dynamic working memory, different portions of which can be
accessed at random with no reduction in speed. By contrast, info stored on tapes
and disks is termed sequential access, since, for example, data at the end of a tape
takes longer to access than data at the beginning of a tape.

RiverTools Users Guide

prefix

204

random topology model


This is a theoretical model for river networks which seeks to explain Hortons laws
and other observations. It was introduced by Shreve (1966, 1967, 1969) and has been
a very influential model. In this model, a river network is modeled as a rooted, binary
tree graph that is drawn at random from the (large) population of all binary tree
graphs that have a given number of sources/leaves. It turns out that the average tree
generated by this model is the same as a self-similar tree with generators Tk = 2 (k-1).
See self-similar tree model (SST) on page 206 and generators on page 190.

raster
A term used to refer to data that is stored as a 2D array, and a synonym for gridded.
Contrast this with the definition for vector.

raster zoom
This is one of the RiverTools Window Tools. It allows you to view a magnified version of the pixels in the vicinity of a pixel that you select with the mouse. Compare to
full-resolution zoom.

raw DEM
In RiverTools, this phrase is used to distinguish between your original DEM grid file,
and a copy of it in which depressions are filled as a preprocessing step in order to create a flow grid. The standard extensions for these two DEM grid files are
_rawDEM.rtg and _DEM.rtg. DEMs of the raw variety contain original, raw
data and will not be altered by RiverTools.

README
Files with this word in their name are generally plain text files containing information
about software, the files in a directory, and so on that can be viewed with any text editor.

record
A record is a hybrid data type that is supported by most programming languages. It
is similar to a short 1D array, except that each element in this array is called a field
and can have a different type. Records are extremely flexible, since the fields can
have any data type and can themselves be records or arrays.

random topology model

RiverTools Users Guide

205

regression
This term refers to the least-squares method of finding the best straight line that fits a
given set of data points on an x vs. y plot. For more information, consult a textbook
on statistics.

relief
The difference between the maximum and minimum elevation values in a given geographical region, such as a basin or the region covered by a DEM. For a basin, the
minimum value usually occurs at the basin outlet.

row major
In this file format, DEM data is written to a binary file row by row, starting with the
row for the north edge of the DEM. See BIL.

samples
A synonym for the number of columns in a grid. See lines on page 196.

scaling option
Some RiverTools routines, such as the Analyze Strahler Streams Stream
CDFs routine, let you choose from a selection of scaling options. The idea is to
rescale a set of measurements by dividing all of the measurements in the set by a
common value. Dividing a set of measured values by the sample mean for the set is a
convenient way to nondimensionalize the measurements. This allows them to be
compared directly to measurements taken at a different scale. This other scale could
be a Strahler order, and RiverTools can be used to show that nondimensionalized
measurements for different Strahler orders often have the same distribution. This is a
type of statistical similarity or scale invariance that is exhibited by river network data.

scanline order
See row major.

Scheidegger model
This model was proposed by Scheidegger (1967) as a spatially-embedded theoretical
model for river networks. You start with a triangular lattice (equilateral triangles).
You then flip a coin for each lattice vertex to decide whether to connect it to the vertex below and to the left, or to the vertex below and to the right. Once you have done

RiverTools Users Guide

regression

206

this for every vertex, the result is a tree-like pattern that looks a bit like a river network. You can apply mathematical results from random walk theory to analyze the
scaling properties of this model, and some of them are similar to what has been
observed for real river networks. It is, however, unrealistic in one important respect.
There is a trend in basin shapes, so that the basin shape factor decreases dramatically
as basin area increases. You can use RiverTools to show that this trend is not usually
present for real basins, via the Analyze Subbasins Shape Plots tool. See
shape factor on page 207. A list of papers that discuss this model can be found in
the section called Recommended Reading on page 64. You can view a Scheidegger
model network by selecting Scheidegger Model from the User menu.

SDTS (Spatial Data Transfer Standard)


A general, self-descriptive file format that can be used to store many different types
of spatial data. Many USGS products are, or eventually will be, available in this format. The USGS 7.5-Minute DEMs (with 30 meter pixels) will soon be available on
the Internet in this format.

self-similar tree model (SST)


River networks are often modeled as rooted tree graphs. Many of the intriguing properties of river networks, such as Hortons laws, can be understood as a consequence
of self-similarity via the self-similar tree model. This model contains an infinite variety of different tree graphs, since each self-similar tree is determined by its own
unique set of generators. With RiverTools, you can show that many river networks
can be modeled to high accuracy as self- similar trees. For example, the Analyze
Strahler Streams Side Trib. Matrix routine shows the measured generator
matrix for the current river network. See the discussion of this dialog in Chapter 2 for
more details. For a self-similar tree graph, the values along the diagonals of this
matrix would be constant. For real river networks, the values along these diagonals
are often approximately constant, despite the variability that is always present in geophysical data sets. See generators on page 190.

shaded aspect
A type of plot in which a flow grid is displayed as an image, with different colors
being used for different values. A flow grid contains the aspect or flow direction for
every pixel in a DEM. You can create such as plot with Display Shaded Aspect.

SDTS (Spatial Data Transfer Standard)

RiverTools Users Guide

207

shaded relief
A type of plot in which every pixel in a DEM is assigned a color which depends on its
elevation and brightness. For example, several pixels with the same elevation might
be shown as different shades of green, where the particular shade is determined by
the pixel brightness. The brightness value indicates how well a pixel is illuminated by
a distant light source. It is computed as the dot product of a light source vector and
the pixels surface normal vector. The surface normal vector is locally perpendicular
to the surface, and the light source vector points from the pixel to the light source.
(Both are unit vectors.) This is a simple and standard lighting model known as Lambertian shading. You can create a shaded relief plot with Display Shaded Relief.
While RiverTools uses a special set of unshaded colors by default, you can instead
use any of the IDL color tables by checking the box in the File Set Colors dialog.

shape factor
See basin diameter on page 178.

side tributary matrix


A side tributary matrix or generator matrix is a way to quantify the extent to which
a river network can be modeled or approximated as a self-similar tree graph. The element at location (i,j) in this (lower triangular) matrix gives the average number of
side tributaries of Strahler order j that enter a stream of order i from the sides. This
average is computed by looking at every Strahler stream of order i in the river network, counting the number of side tributaries of order j that they all have, and then
dividing by the number of streams of order i. Since j ranges from (i-1) down to 1, the
upper half of the matrix is filled with zeros. (Note that the definition of Strahler order
requires that there be two upstream tributaries of order (k-1) at the upstream end of
every stream of order k, but says nothing about the side tributary structure.) Self-similar trees are defined as those whose side tributary matrix has constant values along
diagonals. Matrices with this kind of banded structure are known as Toeplitz matrices. The side tributary matrices for river networks are typically close to having this
Toeplitz property, except for some noise. Note that since there are fewer high order
Strahler streams, the values near the bottom of the matrix are known with less accuracy.
See self-similar tree model (SST) on page 206.

RiverTools Users Guide

shaded relief

208

sinuosity
In RiverTools, sinuosity refers to absolute sinuosity, which is the ratio of the alongchannel length of a channel to the straight-line length of the same channel. This number can never be less than one.

slope
Slope is defined as rise over run, where rise is the difference in elevation between
two pixels (or points), and run is either the straight-line or along-channel distance
between the centers of these two pixels. Local slope refers to the slope between a
given pixel and its neighbor pixel in the direction of flow. Slope is a dimensionless
number, and is related to the angle of tilt, beta, via the formula: slope = tan(beta).

slope grid
This refers to a RiverTools grid file which contains the local slope in the direction of
flow for every pixel in a DEM. The slopes are stored as 4-byte floats in a grid that has
the same number of rows and columns as the corresponding DEM. You can create a
slope grid from a DEM via the Extract D8-based Grid Downstream Slopes
dialog and display it with Display Density Plot.

source
This is the upstream point at which an exterior link begins, and marks the transition
from unchannelized flow over hillslopes to channelized flow. It is a nontrivial matter
to accurately determine the locations of sources from DEMs, and a variety of pruning methods have been developed for this purpose. Good results can be obtained,
however, through a combination of some field work and careful selection of the pruning method. See exterior links on page 187 and pruning method / threshold on
page 203.

source density
This is the ratio of the number of sources in a river network (the magnitude) to the
area of the corresponding drainage basin. (It is closely related to something called the
intensity of a random point process.) See area, source, magnitude, and drainage density.

sinuosity

RiverTools Users Guide

209

straight-line length
The length of a link, Strahler stream, or any other channel segment as measured along
a straight line that connects the two endpoints of the segment. This distance will
always be less than or equal to the along-channel length. See along-channel length
on page 176.

Strahler basins
A Strahler basin is the basin whose outlet is given by the downstream endpoint of a
given Strahler stream.

Strahler order
Strahler stream order is an attribute that can be assigned to every link in a river network. Chains of links that have the same Strahler order form a type of channel segment known as a Strahler stream. Strahler stream order is a measure of the size of the
contributing basin and the structural complexity of the river network that drains this
basin. It also gives an algorithmic way of classifying the major and minor tributaries
in a large river network.
Strahler order can be explained either as a recursive rule, which sheds little light on
what it measures, or as a geometric pruning operation. The latter approach to
Strahler order was first described by Melton (1959). Meltons approach can be summarized as follows. (1) Find all of the channel links that terminate in sources. These
are the leaves of the river network tree, and are also called exterior links. These
links are the Strahler streams of order 1. (2) Imagine removing all of these exterior
links from the tree. (Or create a plot of this using the Display River Network dialog, which lets you assign line colors and widths based on Strahler order.) This will
result in a new and coarser tree that has its own set of exterior links. This time, however, the exterior link really consists of what was a chain of one or more channel
links in the original tree. These chains are the Strahler streams of order 2. Notice
that they represent the second-finest scale of detail in the river network. On average, these streams or tributaries are roughly twice as long as the order 1 streams. This
trend can be observed in a Horton plot via the Analyze Strahler Streams Horton Plots dialog. If you now prune away the second order streams, you will get an
even coarser tree graph that again has its own set of exterior links. Again these will
consist of what was a chain of one or more channel links in the original river network
tree. These are the order 3 streams, and tend to be about twice as long on average as
the order 2 streams. This process can be repeated to assign all of the higher orders

RiverTools Users Guide

straight-line length

210

until all that remains is a single Strahler stream of the highest order present. The doubling of average length with increasing Strahler order is known as Hortons law of
stream lengths. See Hortons laws on page 193.
While the stream ordering concept was introduced by Horton (1932, 1945), it was
refined in subsequent work by Strahler (1957). Sometimes Strahler streams are called
Horton-Strahler streams to honor both contributions, but this can cause confusion
because the ordering schemes put forth by these two authors are not the same.

Strahler stream
See Strahler order on page 209 and Strahler basins on page 209.

streamfile
Each Strahler stream in a river network has a number of attributes that RiverTools
measures when you run the Extract 4. River Network routine. The attributes of
all of the Strahler streams in a given river network are stored in a vector-formatted
file called a RiverTools streamfile.

stream numbers
The number of Strahler streams of each Strahler order. The number of Strahler
streams in a river network tends to increase with decreasing order as a geometric
series. This means that the ratio of successive stream numbers is roughly a constant
(called the bifurcation ratio) that is usually between four and five. This can be illustrated with a standard Horton plot, which you can create with the Analyze
Strahler Streams Horton Plots dialog.

stream order
See Strahler order on page 209.

stream ratios
See Hortons laws on page 193.

string type
A standard data type in which text (e.g. words, lines, and sentences) are stored as
byte-type arrays. An array of string type differs from arrays of other types in that a
different amount of RAM can be used by each element in the array. See byte type,
integer type, long type, float type, and double type (or double precision).

Strahler stream

RiverTools Users Guide

211

subnetwork
A river network can be modeled as a rooted tree graph, with the root corresponding to
the basin outlet. Each subbasin in a given river basin is drained by its own drainage
network, called a subnetwork, which is a subset drainage network that drains the
main basin.

subsampling
In RiverTools, this refers to a method for reducing the number of rows and columns
in a large DEM to create a smaller DEM for the same region that has larger pixels.
For example, a DEM can be reduced by a factor of two by discarding every second
row and column, and then doubling the pixel size that is reported in the RiverTools
infofile. This method is in contrast to another method which consists of reducing the
number of rows and columns by averaging together the values in adjacent cells.
Reduction by subsampling maintains some of the crispness of the original DEM, so
that edges and contrast tend to be higher than for DEMs that have been reduced by
averaging. You can reduce the number of rows and columns in a DEM by either of
these two methods with the Prepare Convert Grid dialog.

surface plot
A 3D perspective plot of what the land surface described by a DEM would look like
if viewed from a specified direction.

surface zoom
This is a RiverTools Window Tool that allows you to interactively create a surface
plot for a small square region in a larger DEM. Window tools are available for windows that have a menu bar across the top with a button labeled Tools. Click on this
button to get a list of tools, and select Surface Zoom.

swap byte order


This phrase refers to the operation by which arrays of multi-byte integers are converted between the big-endian and little-endian byte orders. See byte order on
page 180.

syntax
The way in which words are put together to form valid computer commands. Typically a command will be followed by a list of arguments, with the arguments separated by spaces, commas, or some other delimiter.
RiverTools Users Guide

subnetwork

212

text file
A file containing text characters (usually ASCII), that can be viewed with any standard text editor. Many mail utilities can only handle text files. See binary file on
page 179.

Toeplitz matrix
A Toeplitz matrix is a 2D matrix that has a banded structure with constant values
along diagonals. The value at location (i,j) depends only on the difference (i - j). See
self-similar tree model (SST) on page 206.

Tokunaga tree
The self-similar tree model was introduced by Tokunaga(1966, 1978), but went unnoticed until recently. Most of his analysis focussed on a special type of self-similar tree
that has two-parameter generators of the form Tk = a * c (k-1). This special type provides a very good model for the branching structure of real river networks and is
often referred to as a Tokunaga tree. See self-similar tree model (SST) on page 206
and Recommended Reading on page 64.

topographic index
A topographic index can be defined for every pixel in a DEM as: TI = log(A / S),
where A is the contributing area for the pixel, S is the local slope for the pixel, and
log refers to natural log. This index has been found to be a useful indicator of the likelihood that the soil in a given pixel is saturated.

total length (or total channel length)


In RiverTools, this phrase refers to the total (along-channel) length of all channels in
a given river network. The river network is identified via the location of its outlet.
Note that the total length will depend on the pruning method that has been used to
identify channel source points. See drainage density, pruning method / threshold, and
source.

trailer
Descriptive information, similar to what would be included in a header, but tacked
onto the end of a file instead of the beginning.

text file

RiverTools Users Guide

213

treefile
A RiverTools treefile is a vector-formatted file with the standard extension
_tree.rtv. Treefiles are computed from (raster-formatted) RiverTools flow grids, via
the Extract 3. RT Treefile dialog. Note that every pixel in a particular basin is the
outlet pixel for a subbasin that is contained in this basin. Each of these subbasins has
many attributes, such as contributing area and relief. A RiverTools treefile stores all
of these attributes (in a compact way) for all of the pixels/subbasins in a given basin.
A treefile may contain data for one or more disjoint subbasins in a given DEM.

trib of n orders lower


A given Strahler stream (or order w, say) often has tributaries entering it from the
sides. These side tributaries can have any Strahler order from 1 up to (w-1). In RiverTools, a side tributary of order (w-n) is referred to as a trib of n orders lower. Selfsimilar tree graphs, which are good models of river networks, are distinguished from
one another on the basis of the number of side tributaries of each order that they have.
See self-similar tree model (SST) on page 206 and Strahler order on page 209.

True Color
This term refers to 24-bit or 32-bit color. See color schemes on page 182.

UNIX
A widely-used operating system with many variants, which supports multiple users
and multi-tasking. The philosophy behind UNIX is to provide a large number of simple and efficient utility routines for specific tasks that can then be chained together
(e.g. using pipes) to solve more complex problems. Two standard versions are System V (AT&T) and BSD (Berkeley). Workstation vendors typically have their own
versions, such as SunOS for Suns, Ultrix for DECs, and AIX for IBMs. There is a
free version of UNIX for PCs, known as Linux.

upstream area
See area on page 176.

USGS 1-Degree DEM


These DEMs are available by anonymous ftp from the USGS (EROS Data Center)
for any region in the United States. Each DEM spans a region on the surface of the
Earth that is 1 degree longitude by 1 degree latitude in size. In these DEMs, each
pixel has a fixed- angle xsize (east-west) and ysize (north-south) of 3 arcseconds.
RiverTools Users Guide

treefile

214

This translates to a grid that has 1200 rows by 1200 columns. (But when in USGS
format, an extra row and column is included on the east and south sides.) The ysize of
pixels is always 92.6 meters, while the xsize depends on latitude and is given by [92.6
x cos(pi/180 * lat)] meters. Two 1-degree DEMs side-by-side cover the same region
as a single 1:250,000 scale USGS map.
USGS 1-Degree DEMs for Alaska are available, but due to the convergence of longitude lines near the poles, the DEMs between 50 and 70 degrees north latitude have
601 columns and 6 arcseconds per column. The few DEMs north of 70 degrees have
401 columns and 9 arcseconds per column. The number of rows is still 1201 for all of
these DEMs. The Prepare USGS 1-Degree DEMs Make RTI Files dialog
will automatically take this into account.

USGS 7.5-Minute DEM


These DEMs are available from the USGS for over 80 percent of the US. Each DEM
covers the same region as a standard USGS 1:24,000 scale quad map, 7.5 minutes on
a side. If one degree (or 60 minutes) is divided into eight equal parts, each part will
span 7.5 minutes. It takes sixty-four 7.5-minute DEMs (an 8 x 8 block) to provide the
same coverage as a one-degree DEM. Pixels have a fixed-length geometry with the
xsize and ysize both equal to 30 meters. These DEMs often contain both systematic
and nonsystematic errors that should be removed prior to processing.

UTM (Universal Transverse Mercator)


This map projection was adopted by the U.S. Army in 1947 for large-scale military
maps of the entire world. The region of the Earth between latitudes 84 and -80
degrees is divided into 60 zones that each have a width of 6 degrees of longitude.
These zones are bounded by meridians that are multiples of 6 degrees. In the northsouth directions, this same region is divided into 20 sections that each have a height
of 8 degrees latitude except for the most northern one (72 - 84 degrees). Each eastwest zone has a number code from 1 to 60, starting at -180 degrees, and each northsouth zone has a letter code starting with C and skipping only I and O on the way up
to X. The polar regions north of 84 degrees and south of -80 degrees latitude are
treated separately using the Universal Polar Stereographic (UPS) projection. With a 6
x 8 degree quadrangle, x and y coordinates are measured in meters from the meridian
that lies halfway between the two bounding meridians (but reduced to 0.9996 of true
scale). The USGS uses only the zone code and the x and y coordinates to define
points (numbers increase east and north). See Snyder (1987, pp. 57-64) for an indepth treatment, including a map of the UTM grid zones.

USGS 7.5-Minute DEM

RiverTools Users Guide

215

value zoom
This is one of the RiverTools Window Tools and displays the values in the vicinity of
a user-selected pixel and that pixels x and y coordinates. You can choose Select Grid
from the Options menu to display values for a different RTG file. You can use this
tool to edit RTG files, and several other options are available in the Options menu.
To jump to a particular location in the grid image, you can enter coordinates in the
text boxes at the bottom and then press the Return or Enter button on your keyboard.
This tool is automatically linked to the Vector Zoom and Surface Zoom windows
when all three are open.

vector
Besides the usual definition as a 1D array of values, vector is often used as an adjective to be contrasted with raster. In a situation where we want to store the attributes of
each element in a 1D array of objects, a vector data structure is often the most natural way to store the data. An example would be a list of employees or clients, with
attributes like name and age being stored for each individual. In RiverTools, the
attributes of links and Strahler streams are stored in this way. Contrast this with the
definition of raster. Another aspect of the vector vs. raster issue has to do with precision. Recall that a point is an abstract concept from geometry that corresponds to a
precise location in space that occupies zero volume. By contrast, a pixel is a small
four-sided region that has a definite size. The distinction between a point and a pixel
is very similar to the distinction between vector and raster. See vector-drawn on
page 215.

vector-drawn
When you draw a geometrical object like a line or a circle on a computer screen, it
often has a jagged or pixelated look. This is unavoidable since the resolution of
your screen places a limit on how precisely the object can be drawn. Another device,
however, such as a printer, may be able to draw the same object at a much higher resolution. For this reason it is often best to store an abstract version or description of the
object that is device- independent. This is what is done, for example, in the PostScript page-description language. In RiverTools, contour lines and river network
lines are examples of objects that are described in a device-independent way which
allows them to be plotted at the maximum resolution of the plotting device. Line
drawings, fonts, and other objects with this property are commonly referred to as
vector-drawn. While any number of vector-drawn objects can be overlaid on a
given raster plot, overlaying one raster plot on another causes the first plot to be hidden from view. See multi-layer plot on page 199.

RiverTools Users Guide

value zoom

216

vector zoom
This is one of the RiverTools Window Tools and generates a plot that shows the flow
lines and contour lines in the vicinity of a user- selected pixel in the DEM. Contour
lines are shown in purple, flow lines are shown in yellow, and the pixel boundaries
are shown in gray. (This is one of the few color schemes that make it easy to see all
three features.) The flow lines are generated by drawing a line segment from the center of each pixel to the pixel that it drains to, as specified in the flow grid. The size of
the square region can be changed as a Window Tools preference in the File Set
Preferences dialog. Many other options are available in the Options menu. The plot
window can be resized by dragging on one of the corners with the mouse. Window
tools are available for windows that have a menu bar across the top with a button
labeled Tools. Click on this button to get a list of tools, and select Vector Zoom. This
tool will automatically be linked to the Value Zoom and Surface Zoom tools when
all three are open.

velocity
In the context of channelized flow in river networks, this term usually refers to the
cross-sectionally-averaged downstream component of the flow velocity vector. If AC
denotes the area of a cross-section and Q denotes the discharge through this crosssection, then this average velocity can be computed as Q/AC.

wetness index
See topographic index on page 212.

width function plot


This is a plot of the number of channel links in a river network or subnetwork (above
a basin outlet), as a function of the along-channel flow distance to the basin outlet.
The width function is best known for its connection to the instantaneous unit
hydrograph or IUH. You can create such a plot via the Analyze Channel Links
Width Function dialog.

window tools
In RiverTools, most of the images that you create by selecting routines from the Display menu will have a button menu in the upper left corner of the graphics window
labelled Tools. If you click on this button you will see a pull-down menu of options.
Each of these options invokes a tool that allows you to interact in some way (via the
mouse) with the image. To quit using a particular window tool, you can either select a
vector zoom

RiverTools Users Guide

217

new tool or click the right mouse button. The Tools menu will be unavailable if you
are using any map projection besides None in the Display Map Projection Info
dialog.

working directory
RiverTools data sets for different regions are usually stored in different directories,
which are also known as folders. When you open a data set, the directory is set to the
one that contains your data set, and RiverTools will look in this directory for other
files in the data set. The current directory is also called the working directory.

X vs. Y plot
RiverTools can measure a wide variety of derived quantities for a river network.
Measurements for every pixel in a user-extracted basin are stored in a RiverTools
treefile, while measurements for every channel link and Strahler stream are stored in
linkfiles and streamfiles, respectively. One is frequently interested in how these measurements are related to one another, and plotting one such measurement versus
another for every pixel, link, or stream in a basin is a powerful way to understand
these relationships.

zenith angle
Planets are typically modeled as ellipsoids, with a sphere being a special case. At any
point on the surface of an ellipsoid, a vector called the surface normal vector can be
defined that is perpendicular to the surface at that point. Zenith refers to the outward
direction of the surface normal. For the case of a sphere, the line that goes through the
surface normal also goes through center of the sphere, but this does not occur for a
general ellipsoid. In RiverTools, zenith angle refers to the angle between surfac normal vector and a vector from the surface point to an object such as a satellite or a light
source. The position of this object can be precisely located relative to the surface
point with three pieces of information: (1) the zenith angle, (2) an angle called the
compass angle (in RiverTools), and (3) the distance between the point and the object.
See compass angle on page 182.

RiverTools Users Guide

working directory

218

zenith angle

RiverTools Users Guide

Вам также может понравиться