Create a pseudo node free river network
Summary :: Usage :: Parameters :: Outputs :: Warnings :: Limitations :: Code sample
Summary
Creates a new river network free of pseudo nodes. Attribution in the input river network are not passed over during the conversion.
Usage
This tool creates a pseudo node free version of the input river network. It achieves this by dissolving lines that are joined by a pseudo node. The advantages of a river network free of pseudo nodes are: it simplifies the network without loss of connectivity or change in geometry and can significantly reduces the size of RivEX topological dictionaries thus speeding up processing. Due to the nature of the dissolving process no attribution in the input river is passed into the pseudo-free network.
Consider why the pseudo node is there in the first place. It may represent the transition of a lake to a river channel, do you want to loose that information? It could equally represent where an algorithm creating the network stopped or even when the person capturing the line from a base map simply stopped for lunch...
An example of the impact a network with many pseudo nodes can have is discussed on this page.
Parameters
Name |
Help |
Data type |
River Network |
The river network. For best results the network should be within a File GeoDatabase |
Feature Layer |
Outputs
The output name is auto-generated and output is stored in the File GeoDatabase found in ..\RivEX_Workspace\Outputs\fGDB_Network.gdb which is in the RivEX Outputs workspace folder. The output name is the input river network name plus "_PseudoNodeFree", thus if input river network was called Amazon then the output will be named Amazon_PseudoNodeFree. An ID field called RivID is added to the network which uniquely identifies each polyline. Having created a pseudo-node free network you will have created a network using the minimal number of edges to define the topology of your river network. Your new network can be the start of the next phase; that is, to make a copy of this new network in its own File GeoDatabase in a new folder and then add further attribution to the network.
Warnings
RivEX will drop all attribution and any M or Z values in the geometry. Removing pseudo nodes is often the FIRST step you will want to do before attaching any other attributes.
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
All polylines in the river network are processed, if a selection existed this is cleared prior to processing.
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.scrPseudoNodeFree_RivEX(fc)
# Get output Feature Class name
fcPseudoNodeFreeNetwork = res.getOutput(0)
# Get a count on number of polylines in new network
res = arcpy.GetCount_management(fcPseudoNodeFreeNetwork)
n = int(res.getOutput(0))
print("Number of polylines in Pseudo Node Free network = " + str(n))
except arcpy.ExecuteError:
print("FAILED to create pseudo free network.")