Dissolve boundaries

A dissolve analysis resulting in a new layer with a city boundary generated from neighborhood polygons.

What is a dissolve analysis?

A dissolve analysis is the process of combining polygons from feature datasets that overlap or share a common boundary. To execute the analysis, use the spatial analysis service and the DissolveBoundaries operation.

dissolve boundaries

Dissolve can also generate geature geometry and attribute summary statistics.

Real-world examples of this analysis include the following:

  • Creating a state or city boundary.
  • Creating contiguous sales regions based on the salesperson's name in each county.
  • Visualizing what points of interest or other features are within dissolved drive-time polygons.

How to perform a dissolve analysis

The general steps to performing a dissolve analysis are as follows:

  1. Review the parameters for the DissolveBoundaries operation.
  2. Send a request to get the spatial analysis service URL.
  3. Execute a job request with the following URL and parameters:
    • URL: https://<YOUR_ANALYSIS_SERVICE>/arcgis/rest/services/tasks/GPServer/DissolveBoundaries/submitJob
    • Parameters:
      • inputLayer: The hosted feature layer or feature collectioncontaining polygon features that will be dissolved.
      • dissolveFields: One or more fields from the inputLayer that control which polygons are merged. If you don't supply dissolveFields, or you supply an empty list of fields, polygons that share a common border (that is, they are adjacent) or polygon areas that overlap will be dissolved into one polygon. The result will always include a Count field, which represents the number of input features that share the dissolve criteria.
      • outputName: A string representing the name of the hosted feature layer to reutrn with the results.
  4. Check the status.
  5. Get the output layer results.

To see examples using ArcGIS API for Python, ArcGIS REST JS, and the ArcGIS REST API, go to Examples below.

URL request

Use dark colors for code blocksCopy
 
1
http://<YOUR_ANALYSIS_SERVICE>/arcgis/rest/services/tasks/GPServer/DissolveBoundaries/submitJob?<parameters>

Required parameters

Name
Description
Examples
fThe format of the data returnedf=json f=pjson
tokenAn OAuth 2.0 access token. Learn how to get an access token in Security and authentication.token=<ACCESS_TOKEN>
inputLayerThe layer containing polygon features that will be dissolved.{"url": <SERVICE_URL>, "filter": <where clause>}

{"layerDefinition": {}, "featureSet": {}, "filter": <where clause>}

Key parameters

NameDescriptionExamples
dissolveFieldsOne or more fields from the inputLayer that control which polygons are merged."dissolveFields": ["Class"]
summaryFieldsA list of field names and statistical summary type that you wish to calculate from the polygons that are dissolved together"summaryFields": ["Annual_Sales Sum", "Annual_Sales Min"]
outputNameA string representing the name of the hosted feature layer to return with the results. NOTE: If you do not include this parameter, the results are returned as a feature collection (JSON).{"serviceProperties": {"name": "<SERVICE_NAME>"}}

Example

Dissolve boundaries by attribute value

This example uses the DissolveBoundaries operation to dissolve a hosted feature layer of township polygons based on their attribute values.

In the analysis, the inputLayer value is the Munical Boundaries hosted feature layer. The dissolveFields value is specified as the field Class and multiPartFeatures is set to true. The results contain new Count and AnalysisArea fields containing the statistical details of the dissolve operation.

Dissolve analysis showing township polygons dissolved by an attribute value.

APIs

ArcGIS REST JSArcGIS REST JSArcGIS API for Python
Expand
Use dark colors for code blocksCopy
                                                       
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
  const operationUrl = `${analysisUrl}/DissolveBoundaries/submitJob`;
  const params = {
    inputLayer: {
      url:
        "https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Delaware_County_Municipal_Boundaries/FeatureServer/0",
    },
    multiPartFeatures: true,
    dissolveFields: ["Class"],
    // Output results as a new hosted feature layer
    outputName: {
      serviceProperties: { name: 'Dissolve features result' }
    }
  };

Service requests

Request
HTTPHTTPcURL
Use dark colors for code blocksCopy
     
1
2
3
4
5
POST arcgis.com/sharing/rest/portals/self HTTP/1.1
Content-Type: application/x-www-form-urlencoded

&f=json
&token=<ACCESS_TOKEN>
Response (JSON)
Use dark colors for code blocksCopy
           
1
2
3
4
5
6
7
8
9
10
11
{
  "helperServices": {
    // Other parameters
    "analysis": {
      "url": "https://<YOUR_ANALYSIS_SERVICE>/arcgis/rest/services/tasks/GPServer"
    },
    "geoenrichment": {
      "url": "https://geoenrich.arcgis.com/arcgis/rest/services/World/GeoenrichmentServer"
    }
  }
}