在点处分割线 (Data Management)

许可等级:BasicStandardAdvanced

摘要

根据交叉点或与点要素的邻近性分割线要素。

用法

语法

SplitLineAtPoint_management (in_features, point_features, out_feature_class, {search_radius})
参数说明数据类型
in_features

要分割的输入线要素。

Feature Layer
point_features

包含分割输入线所用位置的输入点要素。

Feature Layer
out_feature_class

要创建的包含分割线的新要素类。

Feature Class
search_radius
(可选)

用于根据与点要素的邻近性分割线。输入线搜索距离范围内的点将用于在线段上距点最近的位置处分割线。

Linear unit

代码实例

SplitLineAtPoint 示例(独立脚本)

本例显示了如何使用 Python 脚本运行 SplitLineAtPoint。

#Name: SplitLineAtPoint_Example.py
# Description: split line features based upon near point features; Search Distance is in linear 
# unit meters

import arcpy
from arcpy import env

env.workspace="C:/data"
inFeatures="streets.shp"
pointFeatures="events.shp"
outFeatureclass="splitline_out.shp"
searchRadius= "20 Meters"
try:
    arcpy.SplitLineAtPoint_management(inFeatures, pointFeatures, outFeatureclass, searchRadius)
except Exception, e:
    # If an error occurred, print line number and error message
    import traceback, sys
    tb = sys.exc_info()[2]
    print "Line %i" % tb.tb_lineno
    print e.message
SplitLineAtPoint 示例(Python 窗口)

本例显示了如何在 Python 窗口中运行 SplitLineAtPoint 工具。

import arcpy
from arcpy import env

env.workspace="C:/data"
arcpy.SplitLineAtPoint_management("streets.shp","events.shp","splitline_out.shp","20 Meters")

环境

相关主题

许可信息

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