Edgematch Features (Editing)

License Level:BasicStandardAdvanced


Modifies input line features by spatially adjusting their shapes, guided by the specified edgematch links, so they become connected with the lines in the adjacent dataset.

Learn more about edgematching


Edgematch Features



EdgematchFeatures_edit (in_features, in_link_features, {method}, {adjacent_features}, {border_features})
ParameterExplanationData Type

Input line features to be adjusted.

Feature Layer

Input line features representing edgematch links.

Feature Layer

Edgematch method to be used to adjust either input features only or both input features and adjacent features to new connecting locations.

  • MOVE_ENDPOINTMoves the endpoint of a line to the new connecting location. This is the default.
  • ADD_SEGMENTAdds a straight segment at the end of a line so it ends at the new connecting location.
  • ADJUST_VERTICESAdjusts the endpoint of a line to the new connecting location. The remaining vertices are also adjusted so its positional changes are gradually reduced toward the opposite end of the line.

Line features that are adjacent to input features. If specified, both the input and adjacent features are adjusted to meet at new connecting locations, either the midpoints of the edgematch links or locations nearest to the midpoints of the links on the border features (if specified). You must provide adjacent features if you provide border features.

Feature Layer

Line or polygon features representing borders between the input and adjacent features. When you specify the border features, you must also specify the adjacent features. Both input and adjacent features are adjusted to meet at new connecting locations nearest to the midpoints of the links on the border features.

Feature Layer

Code Sample

EdgematchFeatures example 1 (Python window)

The following Python window script demonstrates how to use the EdgematchFeatures function in immediate mode.

import arcpy
arcpy.env.workspace = "C:/data"
arcpy.EdgematchFeatures_edit("cityA_Roads.shp", "em_Links.shp"
EdgematchFeatures example 2 (stand-alone Python script)

The following stand-alone Python script is an example of how to apply the EdgematchFeatures function in a scripting environment.

# Name:        EdgematchFeatures_example_script2.py
# Description: Performs edgematching spatial adjustment using links produced by
#              GenerateEdgematchLinks. The links go from input features to adjacent 
#              features. The links are then checked for intersecting conditions, which
#              might not be desired; they are finally used to adjust input features 
#              (a copy is made) to connect with the matched adjacent feautures.
# Author:      Esri
# -----------------------------------------------------------------------

# Import system modules
import arcpy
from arcpy import env

# Set environment settings
env.overwriteOutput = True
env.workspace = r"D:\conflationTools\ScriptExamples\data.gdb"

# Set local variables
inFeatures = "roads1"
adjFeatures = "roads2"
gelOutput = "gelinks_out"

search_distance = "200 Feet"
match_fields = "NAME ROAD_NAME"

qaLocations = "qa_locations"

# Generate rubbersheet links
arcpy.GenerateEdgematchLinks_edit(inFeatures, adjFeatures, gelOutput, search_distance, match_fields)

# ====================================================================================
# Note 1:  The result of GenerateEdgematchLinks may contain errors; see tool reference.
#          Inspection and editing may be necessary to ensure correct links before using
#          them for edgematching.
#          One of the possible errors are undesired intersecting or touching links.  
#          Their locations can be found by the process below.
# ====================================================================================

# Find locations where links intersect or touch; the result contains coincident points
arcpy.Intersect_analysis(gelOutput, qaLocations, "", "", "POINT")

# Delete coincident points
arcpy.DeleteIdentical_management(qaLocations, "Shape")

# ====================================================================================
# Note 2:  At this point you can manually inspect locations in qaLocations; delete or
#          modify links as needed.
# ====================================================================================

# Make a copy of the inFeatures for edgematching
inFeature_Copy = inFeatures + "_Copy"
arcpy.CopyFeatures_management(inFeatures, inFeature_Copy)

# Use the links to adjust the copy of the input features
arcpy.EdgematchFeatures_edit(inFeature_Copy, gelOutput, "MOVE_ENDPOINT")


Related Topics

Licensing Information

ArcGIS for Desktop Basic: No
ArcGIS for Desktop Standard: No
ArcGIS for Desktop Advanced: Yes