Overlay Layers

Overlay Layers

The Overlay Layers task combines two or more layers into one single layer. You can think of overlay as peering through a stack of maps and creating a single map containing all the information found 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 roads are within what counties?
  • What land use is within what soil type?
  • What wells are within abandoned military bases?

Request URL

http://<analysis url>/OverlayLayers/submitJob

Request parameters

ParameterDescription

inputLayer

(Required)

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

Syntax: As described in detail in the Feature input topic, 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 web example:

  • {"url" : "http://myportal.domain.com/server/rest/services/Hosted/hurricaneTrack/FeatureServer/0", "filter": "Month = 'September'"}

REST scripting example:

  • "pointLayer" : {"url": "http://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 detail in the Feature input topic, 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

overlayType

The type of overlay to be performed.

Values: Intersect | Erase

Intersect

Intersect—Computes a geometric intersection of the input layers. Features or portions of features that overlap in both the inputLayer and overlayLayer layers will be written to the output layer. This is the default.

Erase

Erase—Only those features or portions of features in the overlayLayer that are not within the features in the inputLayer layer are written to the output.

REST web example: Intersect

REST scripting example: "overlayType" : "Erase"

outputName

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

REST web example: myOutput

REST scripting example: "outputName" : "myOutput"

context

Context 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

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 Checking job status. Once the job has successfully completed, use the jobId to retrieve the results. To track the status, you can make a request of the following form:

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:

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

ParameterDescription

outputLayer

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

Request example:
{"url": 
"http://<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.