概要
Splits features on input feature classes for any number of polyline or polygon target feature classes using the cutting features and inserts points on the cutting feature.
使用法
Cutting Features must have at least one feature selected.
-
Target features will be divided into multiple features at any point where they intersect the source features.
The Cutting Features will have new vertices added at every point where they intersect the target features.
注意:
このツールを実行すると、入力データが変更されます。詳細と不要なデータの変更を回避するための方法については、「入力データを変更または更新するツール」をご参照ください。
構文
arcpy.topographic.SplitFeatures(cutting_features, target_features, use_target_z)
パラメーター | 説明 | データ タイプ |
cutting_features | The cutting feature used to split the target features where they intersect the target feature class geometries. | Feature Layer |
target_features [target_features,...] | The features that will be divided by the cutting features. | Feature Layer |
use_target_z | Specifies the source of the z-value from the source or target.
| Boolean |
派生した出力
名前 | 説明 | データ タイプ |
out_feature_layer | Features that were divided by the cutting_features. | Feature Layer |
コードのサンプル
This script demonstrates how to use the SplitFeatures tool to split single target features based on the cutting features.
# Name: SplitFeatures_sample1.py
# Description: Splits a single target features based on the cutting features
# Import System Modules
import arcpy
# Check Out Extensions
arcpy.CheckOutExtension('Foundation')
# Setting Local Variables
cutting_features = r'C:\Temp\MapIndex.gdb\Index_Polygons'
target_features = r'C:\Temp\Test.gdb\Builtup_Area_Polygons;C:\Temp\Test.gdb\Vegetation_Polygons'
# Setting selection on cutting features
selected_feature = arcpy.management.MakeFeatureLayer(cutting_features, 'AOI').getOutput(0)
arcpy.management.SelectLayerByAttribute(selected_feature, 'NEW_SELECTION', "PRODUCT_ID = 'V795X16573'")
# Splitting features based on the selected cutting feature
arcpy.topographic.SplitFeatures(cutting_features, target_features, 'DONT_USE_TARGET_Z')
# Check In Extensions
arcpy.CheckInExtension('Foundation')
This script demonstrates how to use the SplitFeatures tool to split all feature classes in a geodatabase on the cutting features.
# Name: SplitFeatures_sample2.py
# Description: Gets all feature classes in a geodatabase and splits them on the selected cutting feature
# Import System Modules
import arcpy
import os
# Check Out Extensions
arcpy.CheckOutExtension('Foundation')
# Setting Local Variables
cutting_features = r'C:\Temp\MapIndex.gdb\Index_Polygons'
target_database = r'C:\Temp\Test.gdb'
# Getting feature classes from the target geodatabase that are managed in a feature dataset
target_features = r''
arcpy.env.workspace = target_database
datasets = arcpy.ListDatasets('*', 'Feature')
for dataset in datasets:
fclasses = arcpy.ListFeatureClasses('*', '', dataset)
for fclass in fclasses:
desc = arcpy.Describe(fclass)
if desc.shapeType in ('Polygon', 'Polyline'):
target_features += os.path.join(target_database, dataset, fclass) + ';'
target_features = target_features[:-1]
# Setting selection on cutting features
selected_feature = arcpy.management.MakeFeatureLayer(cutting_features, 'AOI').getOutput(0)
arcpy.management.SelectLayerByAttribute(selected_feature, 'NEW_SELECTION', "PRODUCT_ID = 'V795X16573'")
# Splitting all features in a database based on the selected cutting feature
arcpy.topographic.SplitFeatures(selected_feature, target_features, 'DONT_USE_TARGET_Z')
# Check In Extensions
arcpy.CheckInExtension('Foundation')
環境
ライセンス情報
- Basic: いいえ
- Standard: 次のものが必要 Production Mapping
- Advanced: 次のものが必要 Production Mapping