摘要
从输入中删除移除要素之内或之外的点,具体取决于操作类型。
插图
用法
要删除移除要素内部或边界上的点,请使用操作类型 INSIDE。要删除移除要素外部的点,请使用操作类型 OUTSIDE。
对于多点输入要素,将仅删除移除要素之内或之外的点,具体取决于操作类型。
语法
ErasePoint_edit (in_features, remove_features, {operation_type})
参数 | 说明 | 数据类型 |
in_features | 输入点要素。 | Feature Layer |
remove_features | 将删除“移除要素”之内或之外的输入要素,具体取决于“操作类型”参数。 | Feature Layer |
operation_type (可选) | 确定是删除“移除要素”之内还是之外的点。
| String |
派生输出
名称 | 说明 | 数据类型 |
out_feature_class | Feature Class |
代码示例
ErasePoint 示例 1(独立脚本)
# Name: ErasePoint_Example.py
# Description: Erase points inside polygon features
import arcpy
from arcpy import env
env.workspace="C:/data"
inFeatures="wells.shp"
removeFeatures="land.shp"
operationType="INSIDE"
arcpy.ErasePoint_edit(inFeatures, removeFeatures, operationType)
ErasePoint 示例 2(独立脚本)
以下独立脚本演示了如何使用 ErasePoint 函数。
# Name: ErasePoint_Example2.py
# Description: Replacing low resolution elevation points inside
# lake areas by high resolution lidar points.
# Import system modules
import arcpy
from arcpy import env
# Set environment settings
env.workspace = "C:/data/Portland.gdb/relief"
# Set local variables
inElevationFeatures = "elevation_points"
inLidarFeatures = "lidar_points"
inLakeFeatures = "lakes"
# Erase elevation points inside lakes
arcpy.ErasePoint_edit(inElevationFeatures, inLakeFeatures, "INSIDE")
# Clip lidar points inside lakes
arcpy.ErasePoint_edit(inLidarFeatures, inLakeFeatures, "OUTSIDE")
# Append the clipped lidar points to the remaining elevation points
arcpy.Append_management(inElevationFeatures, inLidarFeatures, "NO_TEST")
ErasePoint 示例(Python 交互式窗口)
以下 Python 窗口脚本演示了如何在立即模式下使用 ErasePoint 函数。
import arcpy
arcpy.env.workspace = "C:/data"
arcpy.ErasePoint_edit("trees.shp", "park_boundaries", "INSIDE")
环境
许可信息
- ArcGIS Desktop Basic: 否
- ArcGIS Desktop Standard: 是
- ArcGIS Desktop Advanced: 是