Merge Divided Roads (Cartography)

License Level:BasicStandardAdvanced

Summary

Generates single-line road features in place of matched pairs of divided road lanes.

Matched pairs of roads or lanes are merged if they are the same road class, trend generally parallel to one another, and are within the merge distance apart. The road class is specified by the Merge Field parameter. All nonmerged roads from the input collection are copied to the output feature class.

Learn more about how Merge Divided Roads works

TipTip:

This tool is generally used to simplify a relatively large-scale road collection at a smaller scale, where it is appropriate to depict divided highways and boulevards as a single line. At medium scales, it may be preferable to retain divided roads as separate features. In this case, you can use the Resolve Road Conflicts tool instead to ensure that symbolized lanes are displayed without symbol conflicts. If both Resolve Road Conflicts and Merge Divided Roads tools will be run on the same collection of roads, it is advisable to run Merge Divided Roads first.

CautionCaution:

A warning is raised if the input features are not in a projected coordinate system. This tool relies on linear distance units, which will create unexpected results in an unprojected coordinate system. It is strongly suggested that you run this tool on data in a projected coordinate system to ensure valid results. An error is raised and the tool will not process if the coordinate system is missing or unknown.

Illustration

Merge Divided Roads tool result
The Merge Divided Roads tool creates single-line road features in place of divided roads.

Usage

Syntax

MergeDividedRoads_cartography (in_features, merge_field, merge_distance, out_features, {out_displacement_features})
ParameterExplanationData Type
in_features

The input linear road features that contain matched pairs of divided road lanes that should be merged together to a single output line feature.

Feature Layer
merge_field

The field that contains road classification information. Only parallel, proximate roads of equal classification will be merged. A value of 0 (zero) locks a feature to prevent it from participating in merging.

Field
merge_distance

The minimum distance apart, in the specified units, for equal-class, relatively parallel road features to be merged. This distance must be greater than zero. If the units are in pt, mm, cm, or in, the value is considered as page units and takes into account the reference scale.

Linear unit
out_features

The output feature class containing single-line merged road features and all unmerged road features.

Feature Class
out_displacement_features
(Optional)

The output polygon features containing the degree and direction of road displacement, to be used by the Propagate Displacement tool to preserve spatial relationships.

Feature Class

Code Sample

MergeDividedRoads tool example (Python Window)

The following Python window script demonstrates how to use the MergeDividedRoads tool in immediate mode.

import arcpy
from arcpy import env
env.workspace = "C:/data"
env.referenceScale = "50000"
arcpy.MergeDividedRoads_cartography("roads.lyr", "level", "25 meters",
                                      "C:/data/cartography.gdb/transportation/merged_roads",
                                      "C:/data/cartography.gdb/transportation/displacement")
MergeDividedRoads tool example (stand-alone Python script)

This stand-alone script shows an example of using the MergeDividedRoads tool.

# Name: MergeDividedRoads_standalone_script.py
# Description: Resolves symbology conflicts between roads within a specified distance of each other by snapping them together
# Author: ESRI
 
# Import system modules
import arcpy
from arcpy import env

# Set environment settings
env.workspace = "C:/data"
env.referenceScale = "50000"

# Set local variables
in_features = "roads.lyr"
merge_field = "level"
collapse_distance = "25 meters"
out_features = "C:/data/cartography.gdb/transportation/merged_roads"
out_displacement_features = "C:/data/cartography.gdb/transportation/displacement"

# Execute Merge Divided Roads
arcpy.MergeDividedRoads_cartography(in_features, merge_field, collapse_distance, out_features, out_displacement_features)

Environments

Reference Scale

The reference scale is only considered when the Merge Distance parameter is entered in page units. When the reference scale is available, the detection of false dead ends is based on feature separation of 0.5 mm at scale. Otherwise, a value twice the tolerance of the spatial reference is used.

Related Topics

Licensing Information

ArcGIS for Desktop Basic: No
ArcGIS for Desktop Standard: No
ArcGIS for Desktop Advanced: Yes
3/3/2014