在折点处分割线 (数据管理)

许可等级:BasicStandardAdvanced

摘要

创建的要素类中包含通过在折点处对输入线或面边界进行分割而生成的线。

插图

Split Lines At Vertices illustration

用法

语法

SplitLine_management (in_features, out_feature_class)
参数说明数据类型
in_features

线或面输入要素。

Feature Layer
out_feature_class

输出线要素类。

Feature Class

代码实例

SplitLine 示例 1(Python 窗口)

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

import arcpy from arcpy import env env.workspace = "C:/data" arcpy.SplitLine_management("roads.shp", "c:/output/output.gdb/roads_split")
SplitLine 示例 2(独立脚本)

以下独立脚本演示了如何在脚本环境中应用 SplitLine 函数。

# Name: SplitLine_Example2.py # Description: Split a bus line feature at its vertices (bus stops) #              and find a midpoint of each new line for further analysis. # Author: ESRI   # import system modules  import arcpy from arcpy import env  # Set environment settings env.workspace = "C:/data"   # Set local variables inFeatures = "buslines.shp" outFeatureClass = "c:/output/output.gdb/buslines_segments" midPtsFeatureClass = "c:/output/output.gdb/buslines_segments_midPts"  # Run SplitLine to get new lines, each of which is between two bus stops arcpy.SplitLine_management(inFeatures, outFeatureClass)  # Execute FeatureVerticesToPoints to find a midpoint for every new line arcpy.FeatureVerticesToPoints_management(outFeatureClass,                                          midPtsFeatureClass, "MID")  # Comments: You may add attribute information, such as driving time, #           to the midpoint feature class and display the attributes  #           as an alternative label for each line between two bus stops.

环境

相关主题

许可信息

ArcGIS for Desktop Basic:否
ArcGIS for Desktop Standard:否
ArcGIS for Desktop Advanced:是
9/15/2013