概化 (编辑)

摘要

使用指定的最大偏移容差来简化输入要素。 输出要素将包含原始输入折点的子集。

插图

已在最大允许偏移量的边界内简化线
已在最大允许偏移量的边界内简化线

使用情况

    警告:

    此工具会修改输入数据。有关详细信息以及避免数据被意外更改的策略,请参阅修改或更新输入数据的工具

  • 此工具使用与简化线工具的点移除方法(道格拉斯-普克简化算法)相同的算法。 简化线工具提供了更多的参数,并会创建一个新的输出,而此工具则直接修改输入要素类。

  • 此工具可按记录逐一概化要素。 运行此工具后,要素之间之前重合的线段和面边界可能不再重合。

  • 贝塞尔曲线段、圆弧段和椭圆弧段将转换为一组直线段。

  • 此工具不会删除记录或要素。 如果容差比某个面大,则该面将缩减为三个折点。

参数

标注说明数据类型
输入要素

要进行概化的面或线要素。

Feature Layer
容差
(可选)

此容差可设定最大允许偏移量,这会确定简化程度。 该值会限制输出几何与输入几何的容许偏移距离。 可以指定首选测量单位。 默认为要素单位。

Linear Unit

派生输出

标注说明数据类型
更新的输入要素

更新后的输入要素。

Feature Class

arcpy.edit.Generalize(in_features, {tolerance})
名称说明数据类型
in_features

要进行概化的面或线要素。

Feature Layer
tolerance
(可选)

此容差可设定最大允许偏移量,这会确定简化程度。 该值会限制输出几何与输入几何的容许偏移距离。 可以指定首选测量单位。 默认为要素单位。

Linear Unit

派生输出

名称说明数据类型
out_feature_class

更新后的输入要素。

Feature Class

代码示例

Generalize 示例 1(Python 窗口)

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

import arcpy
arcpy.env.workspace = "C:\data\data.gdb"
arcpy.Generalize_edit("zones", "10 Feet")
Generalize 示例 2(独立脚本)

以下独立脚本示例演示了如何在先对要素进行简化然后再进行缓冲的工作流中使用 Generalize 函数:

# Name: BufferZones.py
# Purpose: Simplify features using the Generalize tool and then Buffer them

# Import script modules
import arcpy

# Set the workspace
arcpy.env.workspace = "C:/data/data.gdb"

# Set local parameters
inFeatures = "zones"
gTolerance = "4 Feet"
copFeatures = "zones_cp"
bufDist = "50 Miles"
bufOutput = "zones_buff"

# Since Generalize permanently updates the input, first make a copy of the 
# original feature class
arcpy.CopyFeatures_management (inFeatures, copFeatures)

# Use the Generalize tool to simplify the Buffer input to shorten Buffer 
# processing time
arcpy.Generalize_edit(copFeatures, gTolerance)

# Buffer the output
arcpy.Buffer_analysis(copFeatures, bufOutput, bufDist)

环境

特殊情况

许可信息

  • Basic: 否
  • Standard: 是
  • Advanced: 是

相关主题