Cut
- URL:http:// <geometryservice-url>/cut
- Version Introduced:10.0
Description
The cut operation is performed on a geometry service resource. This operation splits the target polyline or polygon where it is crossed by the cutter polyline.
From 10.1 onwards this operation will call Simplify on the input cutter and target geometries.
You can provide arguments to the cut operation as query parameters defined in the parameters table below.
Request Parameters
Parameter |
Details |
---|---|
f |
Description: (Optional) The response format. The default response format is html. Values: html | json |
cutter |
Description: The polyline that will be used to divide the target into pieces where it crosses the target.The spatial reference of the polylines is specified by sr. The structure of the polyline is same as the structure of the JSON polyline objects returned by the ArcGIS REST API. JSON Structures: Syntax:
Example:
|
target |
Description: The array of polylines/polygons to be cut. The structure of geometry is same as the structure of the json geometry objects returned by the ArcGIS REST API. The spatial reference of the target geometry array is specified by sr. JSON Structures: JSON Structures Syntax:
The"target" property is a geometry of the type defined by "geometryType". Example:
|
sr |
Description: The well-known ID of the spatial reference or a spatial reference json object for the input geometry. For a list of valid WKID values, see Projected coordinate Systems and Geographic coordinate Systems. |
Example Usage
Example1: Cut a polyline geometry.
JSON Response Syntax
The Geometry server's method returns a cutIndexes array along with an array of cut geometries. The cutIndexes array can be used to determine, which of the input geometries were cut to get the resultant geometries.
{"geometryType" : "<esriGeometryPolyline | esriGeometryPolygon>", "geometries" : [ <geometry1>, <geometry2> ], "cutIndexes:" : [ integer1, integer2 ]}
JSON Response Example
{
"geometryType": "esriGeometryPolyline",
"geometries": [
{"paths": [
[
[
6805742.999940723,
1843229.9998401403
],
[
6805741.168907642,
1843467.4288272262
]
],
[
[
6805740.271927804,
1843583.727151066
],
[
6805739.999946713,
1843619.0000463873
]
]
]},
{"paths": [[
[
6805741.168907642,
1843467.4288272262
],
[
6805740.271927804,
1843583.727151066
]
]]},
{"paths": [[
[
6802620.999951139,
1843581.0001223981
],
[
6805496.000106633,
1844962.9999830574
]
]]}
],
"cutIndexes": [
0,
0,
1
]
}