ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

MergeAggregate

Available with Production Mapping license.

  • Summary
  • Discussion
  • Syntax
  • Code sample

Summary

Merges polygon features based on a specified distance and field values.

Discussion

This generalization function can be used to aggregate polygon features for purposes such as meeting the minimum size for polygon features for a product specification or for annotating large multipart features. For example, the layer that contains the merged features can be used to annotate a campus composed of several buildings.

Syntax

MergeAggregate (polygon_feature_layer, distance, field)
ParameterExplanationData Type
polygon_feature_layer

The Layer object that will have features merged.

Layer
distance

The amount of space that can be between the features when they are merged.

Double
field

The field in the Layer object that will be used to determine whether features are merged. If the field values match, the features will be merged if they are within the specified distance.

Field

Code sample

MergeAggregate example

This example merges building features.

import arcpy
import arcpyproduction
from arcpyproduction import generalization

# set environment
arcpy.env.workspace="c:/Data/Austin.gdb"

# Check out Production Mapping license
arcpy.CheckOutExtension("Foundation")

# Define variables
inFeatures="TopographicMap/BuildingA"
field='Name'
distance='.0003'
where = "GNISid='8000020'"

# Create a feature layer
inFeatLayer=arcpy.MakeFeatureLayer_management(inFeatures,"buildings",where)

# Execute the MergeAggregate function
generalization.MergeAggregate(inFeatLayer,distance,field)

Related topics

  • Introduction to arcpyproduction.generalization
  • MergeDissolve

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

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

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal