Overlay layers

An overlay analysis resulting in a new layer with properties (and partial property areas) that intersect flood zones.

What is an overlay analysis?

An overlay analysis is the process of combining two or more using either intersect, union, or erase methods. To execute the analysis, use the and the OverlayLayers operation.

overlay layers

Real-world examples of this analysis include the following:

  • Determining which parcels are within the 100-year floodplain.
  • Finding what types of roads are within a county.
  • Locating the wells that are within an abandoned military base.

How to perform an overlay analysis

The general steps to performing an overlay analysis are as follows:

  1. Review the parameters for the OverlayLayers 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/OverlayLayers/submitJob
    • Parameters:
      • inputLayer: Your dataset or .
      • overlayLayer: The features that will be overlaid with the inputLayer parameter features.
      • overlayType: The type of overlay to be performed.
      • outputName: The name of the resulting feature layer.
  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

1
http://<YOUR_ANALYSIS_SERVICE>/arcgis/rest/services/tasks/GPServer/OverlayLayers/submitJob?<parameters>

Required parameters

Name
DescriptionExamples
fThe format of the data returnedf=json f=pjson
token

An (API key or OAuth 2.0) with the required Spatial Analysis > Feature analysis privilege.

token=<ACCESS_TOKEN>
inputLayerThe point, line, or polygon features that will be overlayed with the overlayLayer parameter.{"url": <SERVICE_URL>, "filter": <where clause>}
overlayLayerThe features that will be overlaid with the inputLayer parameter features.{"url": <SERVICE_URL>, "filter": <where clause>}

Key parameters

Name
DescriptionExamples
overlayTypeThe type of overlay to be performed. [Intersect, Union, Erase]"overlayType": "Union"
outputTypeThe type of intersection to be found. This parameter is only valid when the overlayType parameter value is Intersect. [Input,Line,Point]"outputType":"Line"
outputNameA string representing the name of the 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

Overlay parks with bike paths

This example uses the OverlayLayers operation to find areas of parks that are within 500 feet of bike routes.

In the analysis, the inputLayer value is the Park polygons hosted feature layer. The overlayLayer value is the 500 foot Buffer of bike routes. The overlayType value uses the default intersect method.

Overlay analysis of buffered bike paths (500 ft) that intersect park polygons.

APIs

ArcGIS API for PythonArcGIS API for PythonArcGIS REST JS
Expand
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
input_layer = "https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Park_Polygons/FeatureServer/0"

overlay_layer = "https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Bike_routes_500_ft_buffer/FeatureServer/0"

results = overlay_layers(
    input_layer=input_layer,
    overlay_layer=overlay_layer,
    overlay_type="intersect",
    output_type="Input",
    # Outputs results as a new hosted feature layer
    output_name="Overlay layers results",
)

result_features = results.layers[0].query()

print(f"overlayer layer result item created {results.itemid}")

Service requests

Request
HTTPHTTPcURL
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)
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"
    }
  }
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close