The Merge Layers task copies features from two layers into a new layer. The layers to be merged must all contain the same feature types (points, lines, or polygons). You can control how the fields from the input layers are joined and copied.
For example:
- I have three layers for England, Wales, and Scotland and I want a single layer of Great Britain.
- I have two layers containing parcel information for contiguous townships. I want to join them together into a single layer, keeping only the fields that have the same name and type on the two layers.
Request URL
http://<analysis url>/MergeLayers/submitJob
Request Parameters
Parameter | Description |
---|---|
(Required) | The point, line, or polygon features to merge with the Syntax: As described in detail in the Feature input topic, this parameter can be one of the following:
Examples:
|
(Required) | The point, line, or polygon features to merge with the Syntax: As described in detail in the Feature input topic, this parameter can be one of the following:
Examples:
|
| An array of values that describe how fields from the If a field exists in one layer but not the other, the output You can control how fields on the
Example:
This example performs the following:
|
|
If provided, the task will create a feature service of the results. You define the name of the service. If an Syntax:
In ArcGIS Online or ArcGIS Enterprise 10.9.1 and later, you can overwrite an existing feature service by providing the Syntax:
or
|
|
The Context parameter contains the following additional settings that affect task operation:
Syntax:
|
| The response format. The default response format is Values: |
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 the job
to periodically check the status of the job and messages as described in the topic Check job status. Once the job has successfully completed, you use the job
to retrive the results. To track the status, you can make a request of the following form:
http://<analysis url>/MergeLayers/jobs/<jobId>
Accessing results
When the status of the job request is esri
, you can access the results of the analysis by making a request of the following form.
http://<analysis url>/MergeLayers/jobs/<jobId>/results/mergedLayer?token=<your token>&f=json
Parameter | Description |
---|---|
| The output layer containing the merged features. Example:
The result has properties for parameter name, data type, and value. The contents of value depends upon the
See Feature Output for more information about how the result layer or collection is accessed. |