Hawth's Analysis Tools for ArcGIS


 You are here: Home > Hawths Tools > Tools Descriptions & Help


Input: a) a river centerline layer containing a single line; b) a river marker point layer; c) a table of samples that reference a FROM marker ID and a TO marker ID
Output: a line layer representing the segments of river for each sample, and a point layer representing river markers that have been snapped to the river centerline layer

  • this specialist tool is designed to perform a very specific function: extracting river segments that correspond to river samples taken along various reaches of a river, thereby creating a spatial component to the samples database
  • this tool encompasses several sets of integrated programs and functions including: a) snapping river markers to the river centerline, b) adding vertices to the river centerline at the river marker locations, c) catologing the distances of the markers along the river, d) using this catalog to extract river segments that correspond to samples recorded in a separate table between a set of FROM and TO markers
  • the tool also creates a summary report that identifies any problem records, and makes a record of the input layers for future reference
  • the unique sample ID’s are written to the output shapefile so that these river segments can be related to the database containing the sample data
  • if any point is not within the snap tolerance distance of a line feature, it is not snapped to a line, does not occur in the snapped river marker file, and is not processed if that marker is referenced in the samples database
  • overlapping samples are allowed, and result in overlapping output segments (i.e. the river sample segments can be stacked)


[Click for larger view]


Getting started. At least one point layer, and one line or polygon layer must be loaded into ArcMap in order to use this tool.

THE RIVER CENTERLINE The river center line layer must contain only a single line feature. Pseudonodes are permitted, but it is essential to ensure that all the lines that are joined by pseudonodes have the same orientation. Every arc has a direction, which is initally determine as a function of the order in which vertices are added (i.e. the direction in which it was digitized). Although it is possible to have a river represented by arcs of a mixed orientation (some arcs oriented upstream to downstream, and the others oriented downstream to upstream) it is not permitted in this application because constant directionality is required in order to create logical river sample segments.

The ability to flip the orientation of arcs that are not oriented correctly is built in to ArcMap, and can be accomplished in a few seconds. It is recommended that you check the orientation of the river centerlines before running this program. A set of instructions describing how to do this, and how to flip the orientation if necessary, is described in the article: How to determine and change the directions of complex (multipart) lines for more information).

THE RIVER MARKER POINT The points in the river marker layer do not have to be placed directly on the river centerline. Points that are not on that line will be snapped to it before being used. The points are snapped to the closest point on the river centerline. If you are not satisfied with this placement, it is necessary to move the point closer to the appropriate location on the centerline manually and then rerun the program. The snapped river markers are written to a new shapefile in the output folder for your future reference.

This layer must contain a field in the attribute table of type “double” (i.e. a real/floating point number) that represents the river marker distances. The markers form the basis for determining the start and end points of the river sampling stretches. For this reason, it is essential that the marker layer contains ALL markers that are refered to in the sampling table.

Although it is not necessary to have the river markers in order (i.e. in the order they would be encountered travelling down the river), the program will run a little faster if they are in order.

THE SAMPLES TABLE The samples table must contain the following three columns:
a) a unique sample ID code (type: string/text) containing the ID’s that will relate the newly creted line segments to the sample database;
b) a field (type: double) representing the marker at which sampling started (the FROM marker);
c) a field (type: double) representing the marker at which sampling fininshed (the TO marker).

The table needs to be loaded into ArcMap before starting the tool. Thus the acceptable formats for this table are Access tables, DBase files and comma delimited text files. In the case of textfiles, extra care is required to ensure that ArcMap loads the FROM and TO marker fields as type double.

Setting a snap tolerance. For this application there is a danger that a river marker may be snapped to the wrong place on a river. Some river markers can be considerably distant from the river centerline and if this happened to be in an area where the river was highly convoluted, the marker could theoretically be closer to an incorrect river position than the position it should be at. Thus, it is important to visually inspect the river marker and centerline data to ensure this is not the case (and to manually move that marker if this situation is encountered).

Setting the output folder. Ideally, you should create a new, empty folder on your hard drive before starting the tool. It is always wise to ensure that the directory path to this folder does not contain any spaces, and that the folder is not too deep in the file system structure because very long path names can cause ArcMap to fail to execute certain functions.

To set the output folder, click the folder button next to the output folder text box. There is an aspect to this interface that is not obvious: when you browse to the folder containing the output folder, you need to click on the output folder ONCE, and then press the OK button. If you double click on the output folder, this browse tool will simply open that folder and you will not be able to press the OK button.

The output of this program. There are three important outputs to this program:
1. the river samples shapefile, containing one feature for every successfully processed record in the samples database, and with the unique sample ID’s recorded in the attribute table;
2. the snapped river marker layer (this is created every time the program is run and retained in the output folder because it forms the basis upon which the river segements are extracted);
3. a textfile report that contains a record of what input layers were used, what reference layers were used, how many samples lines were successfully extracted, and a list of all records from the samples database that could not be processed. It is very important to read through this file after the program has been run.

Home | Articles | Services || Hawth's Tools:  Overview | Description | Download | FAQ