增密 (编辑)

许可等级:BasicStandardAdvanced

摘要

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

插图

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
(可选)

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

Linear unit
max_deviation
(可选)

输出线段与原始线段之间的最大距离。此参数仅影响曲线。默认值是关于数据的 xy 容差的函数。

Linear unit
max_angle
(可选)

输出几何与输入几何之间的最大角度。有效范围从 0 到 90。默认值为 10。此参数仅影响曲线。

Double

代码实例

Densify 示例 1(Python 窗口)

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

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

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

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


# 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
climateBackup = "backups/climate.shp"
arcpy.CopyFeatures_management('climate.shp', 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.shp', "DISTANCE", "10 Feet") 

# Snap climate regions feature class to  vegetation layer vertices and edge
# first, snap climate region vertices to the nearest vegetation vertex within 30 Feet
# second, snap climate region vertices to the nearest vegetation edge within 20 Feet

snapEnv1 = ["Habitat_Analysis.gdb/vegtype", "VERTEX", "30 Feet"]    
snapEnv2 = ["Habitat_Analysis.gdb/vegtype", "EDGE",   "20 Feet"]       
arcpy.Snap_edit('climate.shp', [snapEnv1, snapEnv2])

环境

相关主题

许可信息

ArcGIS for Desktop Basic:否
ArcGIS for Desktop Standard:是
ArcGIS for Desktop Advanced:是
9/15/2013