Aggregates features based on specified attributes.
Aggregates features based on specified attributes.
The attributes of the features which become aggregated by dissolve can be summarized or described using a variety of statistic type. The statistic type used to summarize attributes is added to the output feature class as a single field with the following naming standard of statistic type + underscore + input field name. For example if the input has a field named POP that is summarized using the SUM statistics type will result in a field named SUM_POP in the output feature class.
Dissolve can create very large features in the output feature class. This is especially true when there is a small number of unique values in the 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 availability of physical memory may limit the amount (and complexity) of input features that can be processed and dissolved into a single output feature. This limitation could cause an error to occur, as the dissolve process may require more memory than is available. To prevent this input features may be cut and processed using an adaptive tiling algorithm. This algorithm is common to several geoprocessing tools and is described here: Geoprocessing with large datasets . To determine the features that have been tiled, run the FREQUENCY tool on the result of dissolve, specifying the same field(s) used in the dissolve process for the frequency field(s) parameter. Any record with a frequency value of 2 has been tiled. Tile boundaries are preserved in the output features to prevent the creation of features that are too large to be used by ArcGIS. These can be evaluated and removed using either a second dissolve operation or using the merge edit task in ArcMap (1. start editing 2. select the two features 3. click Editor\Merge...)
Null values are excluded from all statistical calculations. For example, the AVERAGE of 10, 5 and NULL is 7.5 ((10+5)/2). The COUNT tool returns the number of values included in the statistical calculation, which in this case is 2.
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.
|Input Features (Required)||
The features to be aggregated.
|Output Feature Class (Required)||
The feature class to be created where the resulting features will be written.
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.
|Statistics Field(s) (Optional)||
Choose the statistics and fields 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.
|(Field String; Field String;...)|
|Create multipart features (Optional)||
Specifies whether multipart features are allowed in the output feature class.
|Unsplit lines (Optional)||
Controls how line features are dissolved.
# 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()