I have a new ArcGIS geoprocessing tool out called Count Coincident Lines on ArcGIS Online or by clicking HERE.
Sometimes we want to know the number of coincident line features in a feature class. For example, perhaps we are interested in the movement of organisms on a landscape and we have multiple least-cost path lines that we are interested in depicting using varying line widths or colors.
Figure 1: Lines are overlapping so it isn’t possible to depict which segments are coincident with others.
Figure 2: Line widths depict the number of coincident lines.
Parameters
The tool has only four parameters and does not create any intermediate files.
Input Lines - The input lines parameter should have multiple coincident line features and should have a projected coordinate system.
Coordinate system – This is the native coordinate system of the input lines. (Right click on the layer – Properties – Source - Projected Coordinate System).
Length unit – The native length unit of the input lines (Right click on the layer – Properties – Source – Linear Unit).
Output Lines – Output line shapefile or geodatabase feature class.
Figure 3: Dialog for the Count Coincident Lines tool.
Model
The model consists of four simple steps and uses tools that only require a Basic ArcGIS license. The first step uses the Add Geometry Attributes tool to add the START_X, START_Y, MID_X, MID_Y, END_X, END_Y. These are reserved fields and should not be present in the input lines.
Next, the model adds a field called COUNT (also a reserved field) and calculates count such that each line segment has a values of 1.
Finally, the tool dissolves based on the START_X, START_Y, MID_X, MID_Y, END_X, END_Y assuming that lines with these six values in common are coincident. There may be circumstances where this assumption is violated so please think carefully about whether this is true for your data or not.
The number coincident segments per line is shown in the COUNT_COUNT field (also reserved) and can be depicted on a map like in Figure 2.
Figure 4: Count Coincident Lines tool as viewed from Model Builder (right click - edit).
Citation
Dilts, T.E. (2020) Count Coincident Lines Toolbox for ArcGIS. University of Nevada Reno. Available at: https://www.arcgis.com/home/item.html?id=6b0d7669d7ea4cc3b62ecddea209c251