Dissolve (Data Management)


Aggregates features based on specified attributes.

Learn more about how Dissolve works


dissolve illustration
dissolve illustration



Dissolve_management (in_features, out_feature_class, {dissolve_field}, {statistics_fields}, {multi_part}, {unsplit_lines})
ParameterExplanationData Type

The features to be aggregated.

Feature Layer

The feature class to be created that will contain the aggregated features.

Feature Class

The field or fields on which to aggregate features.

The Add Field button, which is used only in ModelBuilder, allows you to add expected fields so you can complete the dialog and continue to build your model.

[[field, {statistic_type}],...]

The fields and statistics with which to summarize attributes. Text attribute fields may be summarized using the statistics FIRST or LAST. Numeric attribute fields may be summarized using any statistic. Nulls are excluded from all statistical calculations.

  • FIRST—Finds the first record in the Input Features and uses its specified field value.
  • LAST—Finds the last record in the Input Features and uses its specified field value.
  • SUM—Adds the total value for the specified field.
  • MEAN—Calculates the average for the specified field.
  • MIN—Finds the smallest value for all records of the specified field.
  • MAX—Finds the largest value for all records of the specified field.
  • RANGE—Finds the range of values (MAX–MIN) for the specified field.
  • STD—Finds the standard deviation on values in the specified field.
  • COUNT—Finds the number of values included in statistical calculations. This counts each value except null values. To determine the number of null values in a field, use the COUNT statistic on the field in question, and a COUNT statistic on a different field which does not contain nulls (for example, the OID if present), then subtract the two values.
Value Table

Specifies whether multipart features are allowed in the output feature class.

  • MULTI_PARTSpecifies multipart features are allowed. This is the default.
  • SINGLE_PARTSpecifies multipart features are not allowed. Instead of creating multipart features, individual features will be created for each part.

Controls how line features are dissolved.

  • DISSOLVE_LINESLines are dissolved into a single feature. This is the default.
  • UNSPLIT_LINESLines are only dissolved when two lines have an end vertex in common.

Code Sample

Dissolve example (Python window)

The following Python window script demonstrates how to use the Dissolve tool in immediate mode.

import arcpy
from arcpy import env
env.workspace = "C:/data/Portland.gdb/Taxlots"
arcpy.Dissolve_management("taxlots", "C:/output/output.gdb/taxlots_dissolved",
                          ["LANDUSE", "TAXCODE"], "", "SINGLE_PART", 
Dissolve example 2 (stand-alone script)

The following stand-alone script demonstrates how to use the Dissolve tool.

# Name: Dissolve_Example2.py
# Description: Dissolve features based on common attributes
# Author: ESRI
# Import system modules
import arcpy
from arcpy import env
# Set environment settings
env.workspace = "C:/data/Portland.gdb/Taxlots"
# Set local variables
inFeatures = "taxlots"
tempLayer = "taxlotsLyr"
expression = arcpy.AddFieldDelimiters(inFeatures, "LANDUSE") + " <> ''")
outFeatureClass = "C:/output/output.gdb/taxlots_dissolved"
dissolveFields = ["LANDUSE", "TAXCODE"]
# Execute MakeFeatureLayer and SelectLayerByAttribute.  This is only to exclude 
#  features that are not desired in the output.
arcpy.MakeFeatureLayer_management(inFeatures, tempLayer)
arcpy.SelectLayerByAttribute_management(tempLayer, "NEW_SELECTION", expression)
# Execute Dissolve using LANDUSE and TAXCODE as Dissolve Fields
arcpy.Dissolve_management(tempLayer, outFeatureClass, dissolveFields, "", 
                          "SINGLE_PART", "DISSOLVE_LINES")


Related Topics

Licensing Information

ArcView: Yes
ArcEditor: Yes
ArcInfo: Yes