橡皮页变换要素 (Editing)

许可等级:BasicStandardAdvanced

摘要

利用指定的橡皮页变换连接线,通过橡皮页变换对输入线要素进行空间上的校正修改,从而使线要素更好地与所需目标要素对齐。

插图

Rubbersheet Features

用法

语法

RubbersheetFeatures_edit (in_features, in_link_features, {in_identity_links}, {method})
参数说明数据类型
in_features

要进行校正的输入线要素。

Feature Layer
in_link_features

表示橡皮页变换常规链接的输入线要素。

Feature Layer
in_identity_links
(可选)

表示橡皮页变换识别链接的输入点要素。

Feature Layer
method
(可选)

校正要素所用到的橡皮页变换法。

  • LINEAR此方法稍快,并且当很多连接线均匀分布在校正的数据上时可以生成不错的结果。这是默认设置。
  • NATURAL_NEIGHBOR当存在一些间距很远的连接线时应使用该方法。
String

代码实例

RubbersheetFeatures 示例 1(Python 窗口)

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

import arcpy
arcpy.env.workspace = "C:/data"
arcpy.RubbersheetFeatures_edit("source_Roads.shp","rubbersheet_Links.shp",
                               "rubbersheet_Links_pnt.shp", "LINEAR")
RubbersheetFeatures 示例 2(独立 Python 脚本)

下面的独立脚本演示了如何在脚本环境中应用 RubbersheetFeatures 函数。

# Name:        RubbersheetFeatures_example_script2.py
# Description: Performs rubbersheeting spatial adjustment using links produced by
#              GenerateRubbersheetLinks, assuming newly updated roads are more
#              accurate than existing base roads. The links go from base road data
#              to corresponding 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