Generate Edgematch Links (Editing)

Summary

Finds matching but disconnected line features along the edges of the source data's area and its adjacent data's area, and generates edgematch links from the source lines to the matched adjacent lines.

Learn more about edgematching

Illustration

Generate Edgematch Links

Usage

  • Line features of separate adjacent datasets, such as roads of neighboring countries, may have gaps or be shifted along their meeting edges due to inconsistent data collections or other reasons. You can resolve the edgematching problem between two datasets at a time by using this tool to generate edgematch links, followed by the Edgematch Features tool to adjust features so they connect. The two sets of line features are referred to as source features and adjacent features. This tool finds disjoint but corresponding source and adjacent lines within the specified search distance and generates lines representing edgematch links (also known as displacement links) between them.

    Where two disconnected corresponding features along the edge area are within the search distance to each other, but their endpoints are more than the search distance apart, they are not considered for edgematching.

  • Note:

    All inputs must be in the same coordinate system.

    The output feature class uses the same coordinate system as inputs.

  • The output feature class contains line features representing edgematch links with the following fields.

    • SRC_FID—The source feature ID at the starting points of the links.
    • ADJ_FID—The adjacent feature ID at the ending points of the links.
    • EM_CONF—Values representing the edgematching level of confidence. These values account for the number of candidates found within the search distance, the attribute match situations, and continuities between source and adjacent features. The value ranges from greater than 0 to 100, where 100 represents the highest level of confidence. The higher the EM_CONF value, the better chance the link will be correct. See examples in About edgematching.
  • The Search Distance parameter is used in finding match candidates. Use a distance large enough to catch most of the shifts between corresponding features, but not too large to cause unnecessary processing of too many candidates and potentially getting wrong matches.

  • Once match candidates are found, the characteristics of their shapes are analyzed. A match is determined between the source and adjacent features that make the best continuation. A line representing the edgematch link is generated from the end of the source line to the end of the matched adjacent line.

    You can display these links on a map just as you would any other line features. The lines can be drawn with an arrow at their ends to produce a map similar to the illustration above.

  • If you specify one or more pairs of fields for the Match Fields parameter, spatially matched features are checked against the field values. For example, suppose the update and base features both have a STREET_NAME field containing street names. If a source feature spatially matches two adjacent features but only one adjacent candidate has the same STREET_NAME value as the source feature, it is the better match. The comparison of text strings is case insensitive, meaning that First St is considered the same as first st.

    The attribute match conditions affect the values in the EM_CONF field as described above.

  • Edgematching accuracy relies on data quality and complexity along the edges of the two inputs.

    You need to minimize data errors and select relevant features as input through preprocessing. In general, it is always helpful that within an input dataset the features are topologically correct, have valid geometry, and are singlepart and nonduplicate; otherwise, unexpected results may occur.

  • It is recommended that you review the results and make necessary corrections. During postinspection and postediting, you can use the existing Editing tools to edit the links, for example, to delete an undesired link, alter a link by moving its start or end vertex, or add a new link where necessary. Make sure to update the SRC_FID and TGT_FID values accordingly.

Parameters

LabelExplanationData Type
Source Features

Line features as edgematching source features. All edgematch links start at source features.

Feature Layer
Adjacent Features

Line features adjacent to source features. All edgematch links end at matched adjacent features.

Feature Layer
Output Feature Class

Output feature class containing lines representing edgematch links.

Feature Class
Search Distance

The distance used to search for match candidates. A distance must be specified and it must be greater than zero. You can choose a preferred unit; the default is the feature unit.

Linear Unit
Match Fields
(Optional)

Fields from source and target features, where target fields are from the adjacent features. If specified, each pair of fields are checked for match candidates to help determine the right match.

Value Table

arcpy.edit.GenerateEdgematchLinks(source_features, adjacent_features, out_feature_class, search_distance, {match_fields})
NameExplanationData Type
source_features

Line features as edgematching source features. All edgematch links start at source features.

Feature Layer
adjacent_features

Line features adjacent to source features. All edgematch links end at matched adjacent features.

Feature Layer
out_feature_class

Output feature class containing lines representing edgematch links.

Feature Class
search_distance

The distance used to search for match candidates. A distance must be specified and it must be greater than zero. You can choose a preferred unit; the default is the feature unit.

Linear Unit
match_fields
[[source_field, target_field],...]
(Optional)

Fields from source and target features, where target fields are from the adjacent features. If specified, each pair of fields are checked for match candidates to help determine the right match.

Value Table

Code sample

GenerateEdgematchLinks example 1 (Python window)

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

import arcpy
arcpy.env.workspace = "C:/data"
arcpy.GenerateEdgematchLinks_edit("countyA_Roads.shp",
                                  "countyB_Roads.shp", "em_Links.shp"
                                  "25 Feet")
GenerateEdgematchLinks example 2 (stand-alone script)

The following stand-alone script is a simple example of how to apply the GenerateEdgematchLinks function in a scripting environment.

# Name:        GenerateRubbersheetLinks_example_script2.py
# Description: Generates links for rubbersheeting spatial adjustment. The links go
#              from base road data to newly updated road data. The links are then
#              analyzed for potential errors; they are finally used to adjust the
#              base roads (a copy is made) to better align with the updated roads.
# 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
sourceFeatures = "baseRoads"
targetFeatures = "updateRoads"
grlOutput = "grlinks_out"
grlOutputPts = "grlinks_out_pnt"

search_distance = "300 Feet"
match_fields = "FULLNAME RD_NAME"

qaLocations = "qa_locations"

# Generate rubbersheet links
arcpy.GenerateRubbersheetLinks_edit(sourceFeatures, targetFeatures, grlOutput, search_distance, match_fields)

# ====================================================================================
# Note 1:  The result of GenerateRubbersheetLinks may contain errors; see tool reference.
#          Inspection and editing may be necessary to ensure correct links before using
#          them for rubbersheeting.
#
#          One of the common errors are 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(grlOutput, 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 sourceFeatures for rubbersheeting
arcpy.CopyFeatures_management(sourceFeatures, "sourceFeatures_Copy")


# Use the links for rubbersheeting
arcpy.RubbersheetFeatures_edit("sourceFeatures_Copy", grlOutput, grlOutputPts, "LINEAR")

Licensing information

  • Basic: No
  • Standard: No
  • Advanced: Yes

Related topics