- URL:
- https://<geoanalytics-url>/MergeLayers
- Methods:
GET
- Version Introduced:
- 10.7
Description
The Merge
operation combines two feature layers to create a single output layer.
The tool requires that both layers have the same geometry type (tabular, point, line, or polygon). If time is enabled on one layer, the other layer must also be time enabled and have the same time type (instant or interval). The result will always contain all fields from the input layer. All fields from the merge layer will be included by default, or you can specify custom merge rules to define the resulting schema, such as the following examples:
- You have three layers, one each for England, Wales, and Scotland, and you want a single layer of Great Britain. You can use
Merge
to combine the areas and maintain all fields from each area.Layers - You have two layers containing parcel information for contiguous townships. You want to combine them into a single layer, keeping only the fields that have the same name and type in the two layers.
Request parameters
Parameter | Details |
---|---|
| The table, point, line, or polygon features to merge with the Syntax: As described in Feature input, this parameter can be one of the following:
REST examples
|
| The table, point, line, or polygon features to merge with the Syntax: As described in Feature input, this parameter can be one of the following:
REST examples
|
| Defines how the fields in
REST examples
|
|
The task will create a feature service of the results. You define the name of the service. REST examples
|
|
The
Syntax:
|
|
The response format. The default response format is Values: |
Example usage
Below is a sample request URL for Merge
:
https://hostname.domain.com/webadaptor/rest/services/System/GeoAnalyticsTools/GPServer/MergeLayers/submitJob?predictionType=Train&inputLayer={"url":"https://hostname.domain.com/webadaptor/rest/services/Hurricane/hurricaneTrack/0"}&mergeLayer={"url":"https://hostname.domain.com/webadaptor/rest/services/Hosted/corpusShelters/0"}&mergingAttributes=[]&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 job
to periodically check the status of the job and messages as described in Check job status. Once the job has successfully completed, use job
to retrieve the results. To track the status, you can make a request of the following form:
https://<analysis url>/MergeLayers/jobs/<jobId>
Access 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:
https://<analysis-url>/MergeLayers/jobs/<jobId>/results/output?token=<your token>&f=json
Response | Description |
---|---|
| The output layer containing the merged features.
The result has properties for parameter name, data type, and value. The contents of
|