Disponible avec une licence Production Mapping.
Résumé
Combines polygons that are smaller than a defined size with other polygons that are within a specified distance of another feature.
Illustration
Utilisation
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.
Syntaxe
arcpy.production.AggregatePolygons(Input_Polygon_Features, Combine_Field, Distance, {Minimum_Size}, {Combine_features_with_blank_values_to_features_with_values}, {Barrier_Features})
Paramètre | Explication | Type de données |
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 (Facultatif) | Features smaller than the specified minimum size will be combined. | Areal unit |
Combine_features_with_blank_values_to_features_with_values (Facultatif) | Indicates whether features will be merged when one feature has a blank or null value in the field designated in the Combine_Field parameter.
| Boolean |
Barrier_Features [Barrier_Features,...] (Facultatif) | 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 |
Exemple de code
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)
Environnements
Informations de licence
- Basic: Non
- Standard: Non
- Advanced: Requiert Production Mapping