Edgematch Features (Editing)

Summary

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

Illustration

Edgematch Features tool illustration

Usage

    Caution:

    This tool modifies the input data. See Tools that modify or update the input data for more information and strategies to avoid undesired data changes.

  • This tool is intended to be used after the Generate Edgematch Links tool. It spatially adjusts the shapes of the input lines, guided by the input link features created by the Generate Edgematch Links tool, so they are properly connected with the adjacent line features along the edge areas. The input link features must have SRC_FID and ADJ_FID fields.

  • Note:

    All inputs must be in the same coordinate system.

  • This tool derives new connecting locations from the edgematch links and modifies the corresponding features so their endpoints connect to the new locations. Depending on which of the input parameters (Input Features, Adjacent Features, and Border Features) are specified, the new connecting locations are determined and relevant features adjusted accordingly. This adjustment ensures that matched features are connected, as described below:

    • When only the Input Features parameter is specified, the endpoints of the edgematch links will be used as the new connecting locations. The input lines associated with the edgematch links (that is, their feature IDs match the SRC_FID values of the links) will be adjusted so they end at the endpoints of the links. This ensures that they are connected to the intended adjacent features, which should have participated in the generation of the edgematch links.
    • When both the Input Features and Adjacent Features parameters are specified, the midpoints of the edgematch links will be used as the new connecting locations. Both of the associated input lines and the associated adjacent lines (that is, their feature IDs match the ADJ_FID values of the links) will be adjusted so their endpoints are connected to the midpoints of the links.
    • When the Border Features parameter is specified, the tool will use the locations on the borders that are nearest to the midpoints of the edgematch links as the new connecting locations. The Input Features and Adjacent Features parameter values (if specified) will be adjusted so their endpoints are connected to the computed border locations.

    The Method parameter has the following edgematch options to adjust features. Each option applies to the input features only or to the input features and adjacent features, as described above.

    • Move endpoint—The endpoint of the input line will be moved to the new connecting location.
    • Add segment—A straight segment will be added to the end of an input line so it ends at the new connecting location.
    • Adjust vertices—The endpoint of a line will be adjusted to the new connecting location. The remaining vertices will also be adjusted so their positional changes are gradually reduced toward the opposite end of the line.

Parameters

LabelExplanationData Type
Input Features

The input line features that will be adjusted.

Feature Layer
Input Link Features

The input line features representing edgematch links.

Feature Layer
Method
(Optional)

Specifies the edgematch method that will be used to adjust input features only or input features and adjacent features to new connecting locations.

  • Move endpointThe endpoint of a line will be moved to the new connecting location. This is the default.
  • Add segmentA straight segment will be added to the end of a line so it ends at the new connecting location.
  • Adjust verticesThe endpoint of a line will be adjusted to the new connecting location. The remaining vertices will also be adjusted so that the positional changes are gradually reduced toward the opposite end of the line.
String
Adjacent Features
(Optional)

The line features that are adjacent to the input features. If provided, both the input and adjacent features will be 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 provided).

Feature Layer
Border Features
(Optional)

The line or polygon features representing borders between the input and adjacent features. When you specify border features, both input and adjacent features will be adjusted to meet at new connecting locations nearest to the midpoints of the links on the border features.

Feature Layer

Derived Output

LabelExplanationData Type
Updated Input Features

The updated input features.

Feature Layer

arcpy.edit.EdgematchFeatures(in_features, in_link_features, {method}, {adjacent_features}, {border_features})
NameExplanationData Type
in_features

The input line features that will be adjusted.

Feature Layer
in_link_features

The input line features representing edgematch links.

Feature Layer
method
(Optional)

Specifies the edgematch method that will be used to adjust input features only or input features and adjacent features to new connecting locations.

  • MOVE_ENDPOINTThe endpoint of a line will be moved to the new connecting location. This is the default.
  • ADD_SEGMENTA straight segment will be added to the end of a line so it ends at the new connecting location.
  • ADJUST_VERTICESThe endpoint of a line will be adjusted to the new connecting location. The remaining vertices will also be adjusted so that the positional changes are gradually reduced toward the opposite end of the line.
String
adjacent_features
(Optional)

The line features that are adjacent to the input features. If provided, both the input and adjacent features will be 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 provided).

Feature Layer
border_features
(Optional)

The line or polygon features representing borders between the input and adjacent features. When you specify border features, both input and adjacent features will be adjusted to meet at new connecting locations nearest to the midpoints of the links on the border features.

Feature Layer

Derived Output

NameExplanationData Type
out_feature_class

The updated input 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.edit.EdgematchFeatures("cityA_Roads.shp", "em_Links.shp"
                             "MOVE_ENDPOINT")
EdgematchFeatures example 2 (stand-alone 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
             may not be desired. They are then used to adjust input features 
             (a copy is made) to connect to the matched adjacent features.
"""

# Import system modules.
import arcpy

# Set environment settings.
arcpy.env.overwriteOutput = True
arcpy.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.edit.GenerateEdgematchLinks(inFeatures, adjFeatures, gelOutput, search_distance, match_fields)

"""
Note 1:  The result of GenerateEdgematchLinks may contain errors; see the tool reference.
         Inspection and editing may be necessary to ensure correct links before using
         them for edgematching.

         One of the possible errors is 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.analysis.Intersect(gelOutput, qaLocations, "", "", "POINT")

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

"""
Note 2:  You can manually inspect locations in qaLocations and delete or
         modify links as needed.
"""

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

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

Licensing information

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

Related topics