Label | Explanation | Data Type |
Input Features | The features to be aggregated. | Feature Layer |
Output Feature Class | The feature class to be created that will contain the aggregated features. | Feature Class |
Dissolve Fields (Optional) | The field or fields on which features will be aggregated. | Field |
Statistics Fields (Optional) | Specifies the numeric field or fields containing the attribute values that will be used to calculate the specified statistic. Multiple statistic and field combinations can be specified. Null values are excluded from all calculations. Text attribute fields can be summarized using first and last statistics. Numeric attribute fields can be summarized using any statistic. Available statistics types are as follows:
| Value Table |
Create multipart features (Optional) | Specifies whether multipart features will be included in the output.
| Boolean |
Concatenation Separator
(Optional) | A character or characters that will be used to concatenate values when the Concatenation option is used for the Statistics Fields parameter. | String |
Summary
Aggregates features based on specified attributes using a parallel processing approach.
An alternate tool is available for dissolve operations. See the Dissolve tool documentation for details.
Illustration
Usage
The attributes of the features that become aggregated by the dissolve process can be summarized or described using a variety of statistics. The statistic used to summarize attributes is added to the output feature class as a single field with an underscore and the input field name as the naming standard of the statistic type. For example, if the SUM statistic is used on a field named POP, the output will include a field named SUM_POP.
Very large features can be created in the output feature class. This is important when there is a small number of unique values for the Dissolve Fields parameter value or when dissolving all features into a single feature. Very large features may cause processing or display problems or may have poor performance when drawn on a map or when edited. Problems may also occur if the dissolve output created a feature at the maximum size on one machine, and this output is moved to a machine with less available memory. To avoid these potential problems, uncheck the Create multipart features parameter to divide potentially larger multipart features into many smaller features. For extremely large features, you can use the Dice tool to divide the large features to solve processing, display, or performance problems.
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 statistic returns the number of values included in the statistical calculation, which in this case is 2.
If the Input Features parameter value's geometry type is either point or multipoint and the Create multipart features parameter is checked, the output will be a multipoint feature class. Otherwise, if the Create multipart features parameter is unchecked, the output will be a point feature class.
By default, curve features from the input will be densified in the output. To support curves in the output, use the Maintain Curve Segments environment.
The Pairwise Dissolve tool honors the Parallel Processing Factor environment. If the environment is not set (the default) or is set to 100, full parallel processing will be enabled and the tool will attempt to distribute the work to all the logical cores on the machine. Setting the environment to 0 will disable parallel processing. Specifying a factor between 1 and 99 will cause the tool to determine the percentage of logical cores to use by applying the formula (Parallel Processing Factor / 100 * Logical Cores) rounded up to the nearest integer. If the result of this formula is 0 or 1, parallel processing will not be enabled.
Parameters
arcpy.analysis.PairwiseDissolve(in_features, out_feature_class, {dissolve_field}, {statistics_fields}, {multi_part}, {concatenation_separator})
Name | Explanation | Data Type |
in_features | The features to be aggregated. | Feature Layer |
out_feature_class | The feature class to be created that will contain the aggregated features. | Feature Class |
dissolve_field [dissolve_field,...] (Optional) | The field or fields on which features will be aggregated. | Field |
statistics_fields [[field, {statistic_type}],...] (Optional) | Specifies the numeric field or fields containing the attribute values that will be used to calculate the specified statistic. Multiple statistic and field combinations can be specified. Null values are excluded from all calculations. Text attribute fields can be summarized using first and last statistics. Numeric attribute fields can be summarized using any statistic. Available statistics types are as follows:
| Value Table |
multi_part (Optional) | Specifies whether multipart features will be included in the output.
| Boolean |
concatenation_separator (Optional) | A character or characters that will be used to concatenate values when the CONCATENATION option is used for the statistics_fields parameter. | String |
Code sample
The following Python window script demonstrates how to use the PairwiseDissolve function in immediate mode.
import arcpy
arcpy.env.workspace = "C:/data/Portland.gdb/Taxlots"
arcpy.analysis.PairwiseDissolve("taxlots", "C:/output/output.gdb/taxlots_dissolved",
["LANDUSE", "TAXCODE"], "", "SINGLE_PART")
The following stand-alone script demonstrates how to use the PairwiseDissolve function.
# Name: PairwiseDissolve_Example2.py
# Description: Dissolve features based on common attributes
# Import system modules
import arcpy
arcpy.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"]
# Run MakeFeatureLayer and SelectLayerByAttribute. This is only to exclude
# features that are not desired in the output.
arcpy.management.MakeFeatureLayer(inFeatures, tempLayer)
arcpy.analysis.SelectLayerByAttribute(tempLayer, "NEW_SELECTION", expression)
# Run Dissolve using LANDUSE and TAXCODE as Dissolve Fields
arcpy.analysis.PairwiseDissolve(tempLayer, outFeatureClass, dissolveFields, "",
"SINGLE_PART")
Environments
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes