摘要
利用指定的橡皮页变换连接线,通过橡皮页变换对输入线要素进行空间上的校正修改,从而使线要素更好地与所需目标要素对齐。
插图
用法
该工具旨在结合生成橡皮页变换链接工具使用。橡皮页变换根据指定的橡皮页变换连接线进行空间校正,从而使输入要素位置更加准确的与目标要素位置对齐。输入链接要素表示常规链接;输入点要素表示在橡皮页变换过程中保持源位置不动的标识链接。输入链接要素与标识链接要素均必须具有 SRC_FID 与 TGT_FID 字段。
方法参数确定用于在橡皮页变换过程中创建临时 TIN 的插值方法。更多详细信息,请参阅关于空间校正橡皮页变换。
- LINEAR - 该方法用于创建快速的 TIN 表面,但并不真正考虑邻域。此方法稍快,并且当很多橡皮页变换连接线均匀分布在校正的数据上时可以生成不错的结果。
- NATURAL_NEIGHBOR - 该方法稍慢,但当橡皮页变换连接线不是很多并且在数据集中较为分散时,得出的结果会更加精确。在这种情况下使用线性法则不够精确。
语法
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 (可选) | 校正要素所用到的橡皮页变换法。
| 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 Desktop Basic: 否
- ArcGIS Desktop Standard: 否
- ArcGIS Desktop Advanced: 是