边匹配要素 (Editing)

许可等级:BasicStandardAdvanced

摘要

以指定的边匹配链接为指导,通过在空间上调整输入线要素的形状对其进行修改,这样这些输入线要素便可与相邻数据集中的线互相连接。

了解边匹配的详细信息

插图

Edgematch Features

用法

语法

EdgematchFeatures_edit (in_features, in_link_features, {method}, {adjacent_features}, {border_features})
参数说明数据类型
in_features

要进行调整的输入线要素。

Feature Layer
in_link_features

表示边匹配链接的输入线要素。

Feature Layer
method
(可选)

仅将输入要素或同时将输入要素与相邻要素调整至新连接位置的边匹配方法。

  • MOVE_ENDPOINT将线端点移动至新的连接位置。这是默认设置。
  • ADD_SEGMENT在线端点处添加直线段,从而使线端点位于新的连接位置。
  • ADJUST_VERTICES将线端点调整至新的连接位置。同时也会对其余折点进行调整,从而使折点的位置变化朝着线的另一端逐渐减少。
String
adjacent_features
(可选)

与输入要素相邻的线要素。在经过指定的情况下,输入要素与相邻要素会调整为在新连接位置相连接,新连接位置将是边匹配链接的中点或与边界要素的链接中点距离最近的位置(如果指定)。如果提供了边界要素,则必须还提供相邻要素。

Feature Layer
border_features
(可选)

表示输入要素与相邻要素之间边界的线要素或面要素。指定边界要素时,必须同时指定相邻要素。输入要素与相邻要素都会调整至在距离边界要素的链接中点最近的新连接位置相连接。

Feature Layer

代码实例

EdgematchFeatures 示例 1(Python 窗口)

下列 Python 窗口脚本演示了如何在即时模式下使用 EdgematchFeatures 函数。

import arcpy
arcpy.env.workspace = "C:/data"
arcpy.EdgematchFeatures_edit("cityA_Roads.shp", "em_Links.shp"
                             "MOVE_ENDPOINT")
EdgematchFeatures 示例 2(独立 Python 脚本)

以下独立 Python 脚本是在脚本环境中应用 EdgematchFeatures 函数的示例。

# 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")

环境

相关主题

许可信息

ArcGIS for Desktop Basic: 否
ArcGIS for Desktop Standard: 否
ArcGIS for Desktop Advanced: 是
5/10/2014