生成橡皮页变换链接 (Editing)

许可等级:BasicStandardAdvanced

摘要

查找源线要素与目标线要素在空间上匹配的位置,并生成表示从源位置到相应目标位置的橡皮页变换链接的线。

插图

Generate Rubbersheet Links

用法

语法

GenerateRubbersheetLinks_edit (source_features, target_features, out_feature_class, search_distance, {match_fields}, {out_match_table})
参数说明数据类型
source_features

作为生成橡皮页变换链接的源要素的线要素。所有链接均始于源要素。

Feature Layer
target_features

作为生成橡皮页变换链接的目标要素的线要素。所有链接均止于相匹配的目标要素。

Feature Layer
out_feature_class

包含线的输出要素类,该线表示常规橡皮页变换链接。

Feature Class
search_distance

用于搜索匹配候选项的距离。必须指定一个距离,且此距离必须大于零。可以选择首选单位;默认为要素单位。

Linear unit
match_fields
[[source_field, target_field],...]
(可选)

来自源要素与目标要素的字段的列表。在经过指定的情况下,检查每对字段是否为匹配候选项,从而帮助确定正确的匹配。

Value Table
out_match_table
(可选)

包含完整要素匹配信息的输出表。

Table

代码实例

GenerateRubbersheetLinks 示例 1(Python 窗口)

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

import arcpy
arcpy.env.workspace = "C:/data"
arcpy.GenerateRubbersheetLinks_edit("source_Roads.shp", "target_Roads.shp", 
                                    "rubbersheet_Links.shp", "25 Feet")
GenerateRubbersheetLinks 示例 2(独立 Python 脚本)

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

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

环境

相关主题

许可信息

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