删除 Terrain 点 (3D Analyst)
摘要
从参与 terrain 数据集的一个或多个要素中删除指定的感兴趣区域内的点。
用法
-
从嵌入要素类中删除点将使该 terrain 失效。请在删除点后运行构建 Terrain 工具。
如果 terrain 位于 SDE 中,则必须将其注册为版本。
语法
DeleteTerrainPoints_3d (in_terrain, data_source, polygon_features_or_extent)
参数 | 说明 | 数据类型 |
in_terrain |
The input terrain dataset. | Terrain Layer |
data_source |
点将被移除的一个或多个要素类。 | String |
polygon_features_or_extent | 指定要从中移除点的区域。可使用面要素类或范围。 如果需要范围值,则使用 arcpy.Extent 对象。 | Feature Layer; Extent |
代码示例
DeleteTerrainPoints 示例 1(Python 窗口)
The following sample demonstrates the use of this tool in the Python window:
import arcpy from arcpy import env arcpy.CheckOutExtension("3D") env.workspace = "C:/data" arcpy.DeleteTerrainPoints_3d("sample.gdb/featuredataset/terrain", "mass_pts_embed", "1379938 235633 1382756 237681")
DeleteTerrainPoints 示例 2(独立脚本)
The following sample demonstrates the use of this tool in a stand-alone Python script:
'''********************************************************************** Name: Delete Terrain Outliers Description: Uses Locate Outliers to identify outlier points in a terrain dataset, and eliminates the outliers from the terrain with Delete Terrain Points. **********************************************************************''' # Import system modules import arcpy import exceptions, sys, traceback from arcpy import env try: arcpy.CheckOutExtension('3D') # Set Local Variables env.workspace = 'C:/data' terrain = 'test.gdb/featuredataset/sample_terrain' terrainPt = 'elevation_pts' # name of terrain point data source outliers = 'in_memory/outliers' # Execute LocateOutliers arcpy.ddd.LocateOutliers(terrain, outliers, 'APPLY_HARD_LIMIT', -10, 350, 'APPLY_COMPARISON_FILTER', 1.2, 120, 0.8, 8000) # Execute Delete Terrain Points arcpy.ddd.DeleteTerrainPoints(terrain, terrainPt, outliers) arcpy.CheckInExtension('3D') except arcpy.ExecuteError: print arcpy.GetMessages() except: # Get the traceback object tb = sys.exc_info()[2] tbinfo = traceback.format_tb(tb)[0] # Concatenate error information into message string pymsg = 'PYTHON ERRORS:\nTraceback info:\n{0}\nError Info:\n{1}'\ .format(tbinfo, str(sys.exc_info()[1])) msgs = 'ArcPy ERRORS:\n {0}\n'.format(arcpy.GetMessages(2)) # Return python error messages for script tool or Python Window arcpy.AddError(pymsg) arcpy.AddError(msgs)
相关主题
许可信息
ArcView: 需要 3D Analyst
ArcEditor: 需要 3D Analyst
ArcInfo: 需要 3D Analyst
7/10/2012