- URL:https://<geoanalytics-url>/ClipLayer
- Version Introduced:10.7
Description
The ClipLayer operation extracts input point, line, or polygon features that overlay the clip areas. The output is a subset of your input data based on the areas of interest.
Request parameters
Parameter | Details |
---|---|
inputLayer (Required) | The point, line, or polygon features that will be clipped to the areas of clipLayer features. Syntax: As described in Feature input, this parameter can be one of the following:
REST Examples
|
clipLayer (Required) | The polygon features that define the areas to which inputLayer features will be clipped. Syntax: As described in Feature input, this parameter can be one of the following:
REST Examples
|
outputName (Required) | The task will create a feature service of the results. You define the name of the service. REST Examples
|
context (Optional) | The context parameter contains additional settings that affect task execution. For this task, there are four settings:
|
f | The response format. The default response format is html. Values: html | json |
Example usage
Below is a sample request URL for ClipLayer:
https://webadaptor.domain.com/server/rest/services/System/GeoAnalyticsTools/GPServer/ClipLayer/submitJob?inputLayer={"url":"https://webadaptor.domain.com/server/rest/services/Hurricane/hurricaneTrack/0"}&clipLayer={"url":"https://webadaptor.domain.com/server/rest/services/Hosted/earthquakeTrack/0"}&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.
{
"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>/ClipLayer/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>/ClipLayer/jobs/<jobId>/results/output?token=<your token>&f=json
Response | Description |
---|---|
output | The inputLayer features clipped within the specified clipLayer areas. The type of feature (point, line, or polygon) is the same as the input layer. Request example
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. See Feature output for more information about how the result layer is accessed. |