Wiki

Clone wiki

Geomorphic Network and Analysis Toolbox / Tool_Documentation / Segmentation

Segmentation Tool

This tool is used to segment the stream network into uniform stream segments for calculating Geomorphic Attributes. This tool will segment based on the network as-is, or can utilize a BranchID to segment longer sections of the stream. This tool has the option of leaving the remaining line length as a short segment or to distribute the remainder proportionally throughout the segments.

Image: Segmentation Example

Figure: Stream Network segmented.


Usage

Parameters

Input Stream Network (BranchID optional)

This is the Stream Network to be segmented. This tool can use the Stream BranchID if present.

  • Requirements Include:
    • in a Projected Coordinate System, not Geographic.
    • (Optional) All appropriate lines are connected as a network. This can be checked by running Network Connectivity Tool and rejoining broken lines

      This tool can run on a Discontinuous Stream Network

    • a File GDB Polyline Feature Class due to field requirements
    • is NOT be Z or M enabled.
    • Network should consist of Singlepart features

Segmentation Distance (Meters)

This is the target length of the segments.

Note: Due to floating point precision and tolerance of geometric measurements, the acutal Shape_Length of the line segments will be slightly larger or smaller than this value.

Rule for Remainders

Specify an option for handling remainders of the line length that does not evenly divide by the Segmentation Distance.

  • Remainders A short segment will be present at the end of each original line feature (or BranchID) with a length smaller than the Segmentation Distance.
  • Proportion The remaining length is distributed throughout the segments in the output line network. This ensures that each segment has the same length for each Original line feature (or Stream Branch).

Stream BranchID Field

Field that contains the Stream Branch ID. The default output from the Generate Stream Branch tool is BranchID.

If this input is left blank (or the specified field does not exist), then the tool will segment the line features as is.

Output SegmentID Field

Field that contains the unique Stream Segment ID. The default output is SegmentID.

Output Segmented Line Network

This is the name and location (in a fgdb) of the new line feature class that contains the Segmented Stream Network with SegmentID.

Scratch Workspace

Location to store temporary GIS processing datasets.

You may use:

  1. Create a new file GDB to save temporary processing files (useful for debugging).
  2. If a workspace is not designated, the tool will use the "in_memory" workspace. You will not be able to view the temporary files, but the processing speed will be much faster.

Geoprocessing Environments

  • It is recommended to run this tool in 64-bit python geoprocessing.
  • Geoprocessing Environments:
    • Disable Z and M if you encounter a topology error.

Technical Background

Calculation Method

This tool uses the following methods:

  1. The input line network is dissolved by Stream Branch, if this field exists.
  2. A search cursor loops through the line features
    • If "Leave Remainder as Segment" is selected, then positions along the line are found using the specified target segment length, until the end of the line is reached. These positions are stored as Points.
    • If "Divide Remainder Proportionally"is specified, then the number of "Positions" that can be made are determined by dividing the total line length by the target segment length and taking the integer of the result. Next, each position is found along the line as a ratio of the position number and the total number of positions. This incorporates the 'remainder' evenly along the length of the line.
  3. The line network is split by the points created in step 2 (whichever method was used) to create the new segments.
  4. A unique field ID is added to each of the new segments.

Tool Versions

  • GNAT 1.3
    • Initial version of Tool

Future Developments

  • Ability to change the segment length based on a unique attribute of the line feature (i.e. Stream order)
  • Specify which end of the line the remainder is located. This would involve further development of Stream Network Sequencing.

Updated