Академический Документы
Профессиональный Документы
Культура Документы
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.
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
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
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
Contents
Contents
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
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
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
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.
10
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
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:
12
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.
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.
Starting RiverTools
14
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.
16
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
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.
Importing a DEM
18
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
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.
Setting Preferences
20
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.
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
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.
Setting Preferences
22
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.
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
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.
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.)
Setting Preferences
24
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
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.
Setting Preferences
26
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
27
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.
Setting Colors
28
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.
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.
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
double
8 bytes
bqmin
d * bqmax
30
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.
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
32
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
Formatted ASCII
11,700,142
9,839,616
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.
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.
34
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.
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.
36
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.
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.
38
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
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.
40
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.
42
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.
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.
44
45
46
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.
47
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-
48
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
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.
50
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.
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 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
52
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.
53
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.
54
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.)
55
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.
56
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.
57
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.
58
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.
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.
Exporting Data
60
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.
Exporting Data
62
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
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.
Adding Extensions
64
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
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.
Recommended Reading
66
Recommended Reading
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.
Recommended Reading
68
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
69
Recommended Reading
70
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
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.
Recommended Reading
72
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.
Recommended Reading
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.
Recommended Reading
74
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
Chapter 2:
76
77
78
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.
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.
80
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.
82
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.
83
84
85
86
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.
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.
88
89
90
91
92
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,
94
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.
95
96
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-
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 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.
98
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.
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.
100
101
102
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
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.
104
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).
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.
106
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.
107
108
109
110
111
112
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.
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.
114
115
116
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.
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.
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.
118
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.
Density Plot,
Shaded Relief,
Shaded Aspect,
Finally, overlay one or more vector layers with these dialogs in the Display menu:
River Network
Sources / Jcts.
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.
120
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.
122
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.
124
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.
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.
126
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).
128
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.
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.
130
131
132
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.
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.
134
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.
135
136
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
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.
138
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.
Chapter 3:
140
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.
141
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
142
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
143
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
144
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
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
146
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
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
148
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
149
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
150
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
151
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.
152
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
153
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
154
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
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.
156
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
158
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
159
160
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
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.
162
Appendix A:
164
File Extension
Data Type
Area
_area.rtg
FLOAT or
LONG
Curvature
_curv.rtg
FLOAT
Elevation
_DEM.rtg
variable
_dinf.rtg
DOUBLE
Note
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
_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.
166
167
30
28
32
34
27
31
27
28
39
23
21
22
33
34
35
20
27
30
29
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]
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.
170
171
172
The first line in the file should be: RiverTools Info File
Elevation data type is required. Allowed types are: BYTE, INTEGER, LONG,
FLOAT, and DOUBLE.
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.
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.
174
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
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.
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.
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.
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
179
big-endian
See byte order on page 180.
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.
180
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
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).
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.
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
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.
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.
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
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.
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
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.
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
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.
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
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
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
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.
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.
191
GeoTIFF
A variant of the TIFF image format that is used to store geographical data, such as
DEMs.
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 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.
GeoTIFF
192
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.
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.
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.
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.
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
195
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.
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.
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
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).
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.
log window
198
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.
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.
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.
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-
minima
200
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.
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.
nearest neighbor
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.
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
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.
prefix
204
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.
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
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.
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.
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.
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
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
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
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.
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.
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
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.
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.
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.
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.
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.
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
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.
working directory
218
zenith angle