Dissolve (Data Management) |
|
Release 9.2
Last modified November 29, 2010 |
![]() ![]() ![]() Print all topics in : "Tools" |
Aggregates features based on specified attributes.
Learn more about how Dissolve works
Illustration
Usage tips
The attributes of the aggregated features may be summarized using a statistic type. For example, when aggregating sale territories, the revenue for each feature within a territory could be summed to obtain the total sales revenue for that territory (revenue sum).
The statistic type used to summarize attributes is added to the output feature class as a single field: statistic_field.
Text attribute fields may be summarized using the statistics First or Last. Numeric attribute fields may be summarized using any statistic: Sum, Mean, Max, Min, Range, Std, First, or Last.
Multipart option gives users control over the existence of multipart features in the output feature class. When MULTI_PART is used in the command line or this option is checked on the dialog, multipart features are allowed in the output feature class; otherwise, the output will contain single_part features only.
Dissolve can create very large multipart polygon features. This is especially true when using a small number of Dissolve Field(s) or when dissolving all features into a single feature. Very large features may cause display problems and/or have poor performance when drawn on a map or when edited. To avoid these potential problems, use the Multipart parameter's MULTI_PART option to split potentially larger multipart features into many smaller features.
The spatial reference of the output feature class will be the same as the input features.
The Dissolve Field(s) parameter's Add Field button is used only in ModelBuilder. In ModelBuilder, where the preceding tool has not been run, or its derived data does not exist, the Dissolve Field(s) parameter may not be populated with field names. The Add Field button allows you to add expected fields so you can complete the Dissolve dialog and continue to build your model.
Current map layers may be used to define input features. When using layers, only the currently selected features are used in the Dissolve operation.
Dissolve limits the creation of extremely large features based on the relation of feature size to available memory. In such cases, smaller more manageable features will be created. Warning messages will be used to indicate this occurrence.
The following environment settings affect this tool: Extent, M Domain, Configuration Keyword, Coordinate System, Output has M Values, Output Spatial Grid, Output has Z Values, and Default Z Value,.
Command line syntax
An overview of the Command Line window
Dissolve_management <in_features> <out_feature_class> {dissolve_field; dissolve_field...} {field {statistic type}; field {statistic type}...} {MULTI_PART|SINGLE_PART}
Parameter | Explanation | Data Type |
<in_features> |
The features to be aggregated. |
Feature Layer |
<out_feature_class> |
The feature class to be created. |
Feature Class |
{dissolve_field; dissolve_field...} |
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 |
{field {statistic type}; field {statistic type}...} |
Choose the statistics and fields with which to summarize attributes. |
(Field String; Field String;...) |
{MULTI_PART|SINGLE_PART} |
Specifies whether multipart features are allowed in the output feature class.
|
Boolean |
workspace E:\arcgis\ArcTutor\BuildingaGeodatabase\Montgomery.mdb Dissolve_management landbase\parcels landbase\zoning zoning "RES FIRST"
Scripting syntax
About getting started with writing geoprocessing scripts
Dissolve_management (in_features, out_feature_class, dissolve_field, statistics_fields, multi_part)
Parameter | Explanation | Data Type |
in_features (Required) |
The features to be aggregated. |
Feature Layer |
out_feature_class (Required) |
The feature class to be created. |
Feature Class |
dissolve_field (Optional) |
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 |
statistics_fields (Optional) |
Choose the statistics and fields with which to summarize attributes. |
(Field String; Field String;...) |
multi_part (Optional) |
Specifies whether multipart features are allowed in the output feature class.
|
Boolean |
# DissolveByUnique.py # Description: Divide a line geodatabase feature class into several based on the unique values in a # field. Output will be dissolved to remove pseudonodes (if any). # Author: ESRI # Date: 1/1/04 import arcgisscripting, sys, string, os gp = arcgisscripting.create() try: # Set the workspace (to avoid having to type in the full path to the data every time) gp.workspace = "C:/data/Transportation.mdb" # Set the input feature class fc = "transport" # Set the field to create a list of unique values fieldname = "ROAD_CLASS" # Open a Search Cursor to identify all unique values rows = gp.SearchCursor(fc) row = rows.Next() # Set a list variable to hold all unique values L = [] # Using a while loop, cursor through all records and append unique values to the list variable while row: value = row.GetValue(fieldname) if value not in L: L.append(value) row = rows.Next() # Sort the list variable L.sort() # If a value in the list variable is blank, remove it from the list variable if ' ' in L: L.remove(' ') # Use MakeFeatureLayer to create a selectable layer gp.MakeFeatureLayer(fc, "dissolveLYR") # Loop through the list variable x = 0 for item in L: # Concatenate the query query = "[" + fieldname + "]" + " = '" + L[x] + "'" # Create a selection on the layer with the current unique value (i.e., L[x]) gp.SelectLayerByAttribute("dissolveLYR", "NEW_SELECTION", query) # Use Dissolve to create new feature class based on layer selection, output feature class # will share name of unique value gp.Dissolve_management("dissolveLYR", L[x], fieldname) x = x + 1 except: # If an error occurred while running a tool print the messages print gp.getmessages()