FRAMES | NO FRAMES | Description | Parameters | Examples | Response |
URL | http://<geometryservice-url>/cut |
---|---|
Parent Resource | Geometry Service |
The cut operation is performed on a geometry service resource. This operation splits the input polyline or polygon where it crosses a cutting 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.
Parameter | Details |
---|---|
f | Description: 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. Syntax and Examples: 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 .Syntax and Examples: JSON Structures:Syntax:{ The"target { "geometryType" : "esriGeometryPolyline", "geometries" : [ { "paths" : [ [[-117,34],[-116,34],[-117,33]], [[-115,44],[-114,43],[-115,43]] ] }, { "paths" : [ [[32.49,17.83],[31.96,17.59],[30.87,17.01],[30.11,16.86]] ] } ] } |
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 1: Cut a polyline geometry.
http://sampleserver3.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer/cut?sr=2229cutIndexes
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 ]
}
{ "geometryType" : "esriGeometryPolyline", "geometries" : [ { "paths" : [ [ [6805743.81063464, 1843230.50705698], [6805741.90775131, 1843467.87994181] ], [ [6805740.98190014, 1843583.34526207], [6805740.68892172, 1843619.88816798], [6805674.56471014, 1843619.07583365] ] ] }, { "paths" : [ [ [6805741.90775131, 1843467.87994181], [6805740.98190014, 1843583.34526207] ], [ [6805674.56471014, 1843619.07583365], [6802621.93531673, 1843581.58050181], [6805496.3885573, 1844963.01999615] ] ] } ], "cutIndexes" : [ 0, 0 ] }