ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • 帮助
  • Sign Out
ArcGIS Desktop

ArcGIS Online

专为贵组织打造的制图平台

ArcGIS Desktop

全面的专业性 GIS

ArcGIS Enterprise

面向企业的 GIS

ArcGIS Developers

用于构建位置感知应用程序的工具

ArcGIS Solutions

适用于行业的免费模板地图和应用程序

ArcGIS Marketplace

获取适用于组织的应用程序和数据

  • 文档
  • 支持
Esri
  • 登录
user
  • 我的个人资料
  • 登出

ArcMap

  • 主页
  • 入门
  • 地图
  • 分析
  • 管理数据
  • 工具
  • 扩展模块

Aggregate Polygons

获得 Production Mapping 许可后可用。

  • 描述
  • 插图
  • 使用方法
  • 语法
  • 代码示例
  • 环境
  • 许可信息

描述

Combines polygons that are smaller than a defined size with other polygons that are within a specified distance of another feature.

插图

Aggregate Polygons functionality

使用方法

    警告:

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

  • A warning is raised if the input features are not in a projected coordinate system. This tool relies on linear distance units, which will create unexpected results in an unprojected coordinate system. It is strongly suggested that you run this tool on data in a projected coordinate system to ensure valid results. An error is raised and the tool will not process if the coordinate system is missing or unknown.

  • If this tool is run in an edit session in ArcMap, you can stop the edit session without saving changes to restore features that have been deleted.

  • The aggregated feature inherits attribute values from the input polygon feature with the lowest ObjectID.

语法

arcpy.production.AggregatePolygons(Input_Polygon_Features, Combine_Field, Distance, {Minimum_Size}, {Combine_features_with_blank_values_to_features_with_values}, {Barrier_Features})
参数说明数据类型
Input_Polygon_Features

Polygon feature class that contains the features that will be combined. The features in this feature class will be modified.

Feature Layer
Combine_Field

The values in this field will be compared when combining features. If both features have the same value, the features will be combined. If both features have values and the values are different, the features will not be combined. If one feature has a value and the other is blank or empty, the Combine_features_with_blank_values_to_features_with_values parameter will determine if the features will be combined.

Field
Distance

The tolerance that can exist between two features before they are combined.

Features that are separated by less than this distance will be combined.

Linear unit
Minimum_Size
(可选)

Features smaller than the specified minimum size will be combined.

Areal unit
Combine_features_with_blank_values_to_features_with_values
(可选)

Indicates whether features will be merged when one feature has a blank or null value in the field designated in the Combine_Field parameter.

  • COMBINE_BLANK —Features with blank or null values are merged with features that have values.
  • DO_NOT_COMBINE_BLANK —Features with blank or null values are not merged with other polygon features that have values. This is the default.
Boolean
Barrier_Features
[Barrier_Features,...]
(可选)

The layers containing the line or polygon features that are aggregation barriers for input features. Features will not be aggregated across barrier features. Barrier features that are in geometric conflict with input features will be ignored.

Feature layer

代码示例

AggregatePolygons example 1 (stand-alone script)

The following stand-alone sample script demonstrates how to use AggregatePolygons.

# Name: AggregatePolygonsExample.py
# Description: Combines polygons that are below a specified size and within a certain
#               distance of another feature
# Author: Esri
# Date: February 2014

import arcpy

# Check out Production Mapping license & set environment
arcpy.CheckOutExtension("Foundation")
arcpy.env.workspace="c:/Data/LocalGovernment.gdb"

# Define variables
inFeatures="ReferenceData/FacilitySite"
inFeatLayer="facilities"
combineField='FCODE'
distance='220 Feet'
where = "SHAPE_Area < 500000"

# Create a feature layer for Aggregate Polygons
arcpy.MakeFeatureLayer_management(inFeatures,inFeatLayer,where)

# Aggregate the polygon features
arcpy.AggregatePolygons_production(inFeatLayer,combineField,distance)
AggregatePolygons example 2 (stand-alone script)

The following stand-alone sample script demonstrates the barrier feature parameter in AggregatePolygons.

# Define variables
inFeatures="ReferenceData/FacilitySite"
inFeatLayer="facilities"
combineField='FCODE'
distance='220 Feet'
where = "SHAPE_Area < 500000"
barriers= ["FacilitiesStreets/Street"]


# Create a feature layer for Aggregate Polygons
arcpy.MakeFeatureLayer_management(inFeatures,inFeatLayer,where)

# Aggregate the polygon features
arcpy.AggregatePolygons_production(inFeatLayer,combineField,distance,barriers)

环境

  • 当前工作空间
  • 临时工作空间

许可信息

  • Basic: 否
  • Standard: 否
  • Advanced: 需要 Production Mapping

相关主题

  • An overview of the Generalization toolset
  • Convert Polygons
  • Modify Underlying Polygon

ArcGIS Desktop

  • 主页
  • 文档
  • 支持

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

关于 Esri

  • 关于我们
  • 招贤纳士
  • Esri 博客
  • 用户大会
  • 开发者峰会
Esri
分享您的想法。
Copyright © 2021 Esri. | 隐私政策 | 法律声明