Skip To Content
ArcGIS Developer
Dashboard

Overlay Layers

Description

Overlay Layers

The OverlayLayers operation combines two or more layers into a single layer. You can think of overlay as peering through a stack of maps and creating a single map containing all the information in the stack. Overlay is used to answer one of the most basic questions of geography: What is on top of what? The following are examples:

  • What parcels are within the 100-year floodplain? (Within is another way of saying on top of.)
  • What land use is on top of what soil type?
  • What mines are within abandoned military bases?
Note:

Sliver features may be excluded based on the tolerance of the processing spatial reference.

Request parameters

ParameterDescription
inputLayer

(Required)

The point, line, or polygon features that will be overlaid with the overlayLayer features.

Syntax: As described in Feature input, this parameter can be one of the following:

  • A URL to a feature service layer with an optional filter to select specific features
  • A URL to a big data catalog service layer with an optional filter to select specific features
  • A feature collection

REST Examples

//REST web example
{"url": "https://myportal.domain.com/server/rest/services/Hosted/hurricaneTrack/FeatureServer/0", "filter": "Month = 'September'"}

//REST scripting example
"inputLayer": {"url": "https://myportal.domain.com/server/rest/services/Hosted/hurricaneTrack/FeatureServer/0", "filter": "Month = 'September'"}
overlayLayer

(Required)

The features that will be overlaid with the inputLayer features.

Syntax: As described in Feature input, this parameter can be one of the following:

  • A URL to a feature service layer with an optional filter to select specific features
  • A URL to a big data catalog service layer with an optional filter to select specific features
  • A feature collection

REST Examples

//REST web example
{"url": "https://myportal.domain.com/server/rest/services/Hosted/hurricaneTrack/FeatureServer/0", "filter": "Month = 'September'"}

//REST scripting example
"pointLayer": { "url":"https://myportal.domain.com/server/rest/services/Hosted/hurricaneTrack/FeatureServer/0", "filter": "Month = 'September'"}
overlayType

(Optional)

The type of overlay to be performed. For more information on the values for this parameter, see the Overlay relationships section below.

Values: Intersect | Erase | Union | Identity | SymmetricalDifference

REST Examples

//REST web example
Intersect

//REST scripting example
"overlayType": "Erase"
includeOverlaps

(Optional)

A Boolean that specifies whether input features in the same dataset contain overlapping features. The default is true. Change this parameter to false if you don't want self-intersecting features for the input layer or the overlay layer. Setting this to false also improves performance.

Note:

For 10.6 and 10.6.1, this parameter is only used when overlayType is Intersect. The parameter is not used for 10.7 or later and will always support self overlapping datasets.

Values: true | false

REST Examples

//REST web example
true

//REST scripting example
"includeOverlaps": false
outputName

(Required)

The task will create a feature service of the results. You define the name of the service.

REST Examples

//REST web example
myOutput

//REST scripting example
"outputName": "myOutput"
context

(Optional)

The context parameter contains additional settings that affect task execution. For this task, there are four settings:

  • Extent (extent)—A bounding box that defines the analysis area. Only those features that intersect the bounding box will be analyzed.
  • Processing spatial reference (processSR)—The features will be projected into this coordinate system for analysis.
  • Output spatial reference (outSR)—The features will be projected into this coordinate system after the analysis to be saved. The output spatial reference for the spatiotemporal big data store is always WGS84.
  • Data store (dataStore)—Results will be saved to the specified data store. The default is the spatiotemporal big data store.

Syntax:
{
"extent" : {extent},
"processSR" : {spatial reference},
"outSR" : {spatial reference},
"dataStore":{data store}
}

f

The response format. The default response format is html.

Values: html | json

Overlay relationships

The tables below describe the overlay relationships supported by the overlayType parameter.

Overlay relationships at 10.7 and later

RelationshipDescription
Intersect

Computes a geometric intersection of the input layers. Features or portions of features that overlap in both inputLayer and overlayLayer are written to the output layer. This is the default. Intersect supports the following geometries as inputs (inputLayer - overlayLayer):

  • Point - Point, Line, Polygon
  • Line - Point, Line, Polygon
  • Polygon - Point, Line, Polygon
Erase

The features or portions of features in the inputLayer that do not overlap the features in the overlayLayer are written to the output. Erase supports the following geometries as inputs (inputLayer - overlayLayer):

  • Point - Point
  • Line - Line
  • Polygon - Polygon
Union

Computes a geometric union of inputLayer and overlayLayer. All features and their attributes are written to the layer. Union supports the following geometries as inputs (inputLayer - overlayLayer):

  • Polygon - Polygon
Identity

Computes a geometric intersection of the input features and identity features. Features or portions of features that overlap in both inputLayer and overlayLayer are written to the output layer. Identity supports the following geometries as inputs (inputLayer - overlayLayer):

  • Point - Point, Polygon
  • Line - Line, Polygon
  • Polygon - Polygon
SymmetricalDifference

Features or portions of features in inputLayer and overlayLayer that do not overlap are written to the output layer. SymmetricalDifference supports the following geometries as inputs (inputLayer - overlayLayer):

  • Point - Point
  • Line - Line
  • Polygon - Polygon

Overlay relationships at 10.6 and 10.6.1

RelationshipDescription
Intersect

Computes a geometric intersection of the input layers. Features or portions of features that overlap in both inputLayer and overlayLayer are written to the output layer. This is the default. Intersect supports the following geometries as inputs (inputLayer - overlayLayer):

  • Point - Point
  • Line - Line
  • Polygon - Polygon
Erase

The features or portions of features in the inputLayer that do not overlap the features in the overlayLayer are written to the output. Erase supports the following geometries as inputs (inputLayer - overlayLayer):

  • Point - Point
  • Line - Line
  • Polygon - Polygon

Example usage

The following is a sample request URL for OverlayLayers:

https://machine.domain.com/webadaptor/rest/services/System/GeoAnalyticsTools/GPServer/OverlayLayers/submitJob?&inputLayer={"url":"https://webadaptor.domain.com/server/rest/services/Hurricane/hurricaneTrack/0"}&mergeLayer={"url":"https://webadaptor.domain.com/server/rest/services/Hosted/corpusShelters/0"}&overlayType=Union&outputName=myOutput&context={"extent":{"xmin":-122.68,"ymin":45.53,"xmax":-122.45,"ymax":45.6,"spatialReference":{"wkid":4326}}}&f=json

Response

When you submit a request, the service assigns a unique job ID for the transaction.

Syntax:
{
"jobId": "<unique job identifier>",
"jobStatus": "<job status>"
}

After the initial request is submitted, you can use jobId to periodically check the status of the job and messages as described in Check job status. Once the job has successfully completed, use jobId to retrieve the results. To track the status, you can make a request of the following form:

https://<analysis url>/OverlayLayers/jobs/<jobId>

Access results

When the status of the job request is esriJobSucceeded, you can access the results of the analysis by making a request of the following form:

https://<analysis-url>/OverlayLayers/jobs/<jobId>/results/output?token=<your token>&f=json

ResponseDescription
output

The features that are the result of the overlay. The type of feature (point, line, or polygon) depends on the input layers.

{"url": "https://<analysis-url>/OverlayLayers/jobs/<jobId>/results/output"}

The result has properties for parameter name, data type, and value. The contents of value depend on the outputName parameter provided in the initial request. The value contains the URL of the feature service layer.

{
"paramName":"output", 
"dataType":"GPRecordSet",
"value":{"url":"<hosted featureservice layer url>"}
}

See Feature output for more information about how the result layer is accessed.