Available with Production Mapping license.
Merges polygon features based on a specified distance and field values.
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.
MergeAggregate (polygon_feature_layer, distance, field)
The Layer object that will have features merged.
The amount of space that can be between the features when they are merged.
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.
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)