• Imprimeix

Cut

The “cut” operation allows to generate new polygons or polylines by splitting the polylines or polygons specified by the user which intersect with the cutting polyline.

The following figures show the result of this operation. Light blue lines (3) are divided obtaining a total of five (5) lines.

Figure 1. Example resulting from the operation " cut".

Example of request:

http://galileo.icc.cat/arcgis/rest/services/Utilities/Geometry/GeometryServer/cut?sr=25831&target={"geometryType":"esriGeometryPolygon","geometries":[{"rings":[[[418000,4584800],[418500,4584800],[418500,4585000],[418000,4585000],[418000,4584800]]]}]}&cutter={"paths":[[[417500,4584900],[419000,4584900]]]}&f=json&token=WgTR74xQdSvkHVECel6pSEijFKWafsP3g9DLA8WYg1sD3ycDBOx4g-Vj_i4xHhus

and related response:

{
  "geometryType": "esriGeometryPolygon",
  "geometries": [
  {"rings": [[[418500,4584900],[418000,4584900],[418000,4585000],
                 [418500,4585000],[418500,4584900]]]}
  ,
  {"rings": [[[418000,4584900],[418500,4584900],[418500,4584800],
                 [418000,4584800],[418000,4584900]]]}
  ],
  "cutIndexes": [0,0]
}

Service parameters

Parameter

Description

f

Response format

Valid values: html | json
Deafult value: html

cutter

Polyline used to divide the specified geometries to the ‘target’ parameter where intersect. The syntax of this parameter should be:

[<polyline>]

target

Array of geometries from which the resulting elements of the intersection with the polyline specified at the “polylines” parameter are required. The syntax of this parameter should be:

{
"geometryType" : "<esriGeometryPoint | esriGeometryPolyline | esriGeometryPolygon | esriGeometryMultipoint>"
"geometries" : [ <geometry1>, <geometry2> ]
}

sr

Reference system identifier used to  describe geometry resulting from operation

token

Required security key in order to perform this function which is generated by filling in the corresponding form.

Additional information