Summary :: Usage :: Parameters :: Outputs :: Warnings :: Limitations :: Code sample

Summary


Adds a new field identifying the monotonicity of the polylines in the river network.

Usage


This tool adds a new text field called MTrend that categorises the M-value sequence of each polyline. If the field exists it creates a new field with a simple numeric suffix (e.g. MTrend_1).


The input river network must be M-enabled for this tool to function. 


It assigns each polyline a code indicating the trend in M-values along the polyline:


Value

Description

N

The measure values along the polyline are not yet set (i.e. the M values were "NaN").

L

All measure values are the same value along the polyline.

I

The measure values are increasing in value with the flow direction of the polyline.

D

The measure values are decreasing in value with the flow direction of the polyline.

M

The measure values are mixed such that there are sequences which increase, level off and/or decrease along the polyline.

U

Unknown, RivEX was unable to determine the trend


If you network is a measured network it is useful to know how the M-values are changing across the network.


Parameters


Name

Help

Data type

River Network

The river network. For best results the network should be within a File GeoDatabase

Feature Layer

Outputs


An updated river network with a new text field recording the monotonicity of each polyline.

WarningWarnings


With the release of ArcGIS Pro 3.2.1 a switch control appears on parameters that accept tables\feature classes, do not interact with it! More advice here.

Limitations


  1. Any selection on the input layer is cleared and then the tool checks all polylines in the river network.
  2. River network must not be a compressed dataset.


Code sample


A minimum code example showing how to call this tool in a python script. This can be run in console or your preferred IDE. If you right click on the tool in the RivEX toolbox and select properties you can view parameter order.


import arcpy

# Import RivEX toolbox
arcpy.ImportToolbox(r"C:\RivEX_ArcPro\RivEX.atbx")

try:
    # Input river Feature Class
    fc = r"C:\Temp\ORN\ORN.gdb\ORN"
    
    # Run RivEX tool
    res = arcpy.scrAttrMonotonicity_RivEX(fc)
    
    # Show output Feature Class name which is same as input 
    updatedfc = res.getOutput(0)
    print(updatedfc)
except arcpy.ExecuteError:
    print("FAILED to add Monotonicity")

Return to top of page