增密 (编辑)

摘要

沿线或多边形要素插入折点。还可将曲线线段(贝塞尔、圆弧、椭圆弧)替换为增密线段。

插图

The curve is densified into linear segments by either the Offset, Distance, or Angle

用法

语法

Densify_edit (in_features, {densification_method}, {distance}, {max_deviation}, {max_angle})
参数说明数据类型
in_features

要进行增密的面或线要素类。

Feature Layer
densification_method
(可选)

用来处理要素增密的方法。

  • DISTANCE 此工具将对曲线应用“距离”方法,就像对直线一样。这是默认设置。
  • OFFSET此工具将对曲线应用“最大偏移偏差”参数。
  • ANGLE此工具将对曲线应用“最大偏转角”参数。
String
distance
(可选)

折点间的最大线性距离。此距离始终应用于线段,并用来简化曲线。默认值是容差的函数。

Linear unit
max_deviation
(可选)

输出几何与输入几何之间的最大距离。此参数专门处理曲线的简化。默认值是将“要素类”转换为 Shapefile 所用的值。

Linear unit
max_angle
(可选)

输出几何与输入几何之间的最大角度。此参数专门处理曲线的简化。输入角度可介于 0 与 90 度之间。默认值是将“要素类”转换为 Shapefile 所用的值。

Double

代码示例

增密示例(Python 窗口)

以下 Python 窗口脚本演示了如何在即时模式下使用“增密”函数。

import arcpy
arcpy.Densify_edit("C:/data/data.gdb/lines", "ANGLE","", "", "0.75")
增密示例 2(独立脚本)

以下独立脚本显示的是将“增密”函数与“捕捉”编辑工具结合使用的工作流。

# Name: Snap.py
# Description: Snap climate regions boundary to vegetation layer
#              boundary to ensure common boundary is coincident
# Author: ESRI

# import system modules 
import arcpy

# Set environment settings
arcpy.env.workspace = "C:/data"

# Make backup copy of climate regions feature class, 
# since modification with the Editing tools below is permanent
climate = "climate.shp"
climateBackup = "C:/output/Output.gdb/climateBackup"
arcpy.CopyFeatures_management(climate, climateBackup)

# Densify climate regions feature class to make sure there are enough
#vertices to match detail of vegetation layer when layers are snapped
arcpy.Densify_edit(climate, "DISTANCE", "10 Feet") 

# Snap climate regions feature class to  vegetation layer vertices and edge
veg = "Habitat_Analysis.gdb/vegtype"
# first, snap climate region vertices to the nearest vegetation layer vertex within 30 Feet
snapEnv1 = [veg, "VERTEX", "30 Feet"]    
# second, snap climate region vertices to the nearest vegetation layer edge within 20 Feet
snapEnv2 = [veg, "EDGE", "20 Feet"]       
arcpy.Snap_edit(climate, [snapEnv1, snapEnv2])

环境

相关主题


7/10/2012