在折点处分割线 (Data Management)
摘要
创建的要素类中包含通过在折点处对输入线或面边界进行分割而生成的线。
插图
用法
-
输入要素的属性将保留在输出要素类中。
-
如果输入线的起点和终点之间没有折点,则将其按原样复制到输出中;否则,两个连续折点之间的每一段都将成为输出中的线要素。同样,沿面边界的两个连续折点之间的每一段都将成为输出中的线要素。输出要素类可能是一个比输入要素大得多的文件,具体取决于输入要素包含的折点数。
-
参数(真)曲线或线段不会增密,而是保留为输出线要素的真曲线。但这一点不适用于 shapefile 数据。
-
该工具在脚本中的函数名称为 SplitLine,而不是 SplitLineAtVertices。
语法
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: 是
5/10/2014