Reshape

The ‘reshape’ operation allows to modify the geometry of a polyline or part of a polygon specified by the user, using a reference line also indicated by the user. The resulting geometry takes the form of the reference line where it intersects with the input geometry (polyline or polygon).

The following illustrations show the result of this operation.

Example of request:

http://galileo.icc.cat/arcgis/rest/services/Utilities/Geometry/GeometryServer/reshape?sr=25831&target={"geometryType":"esriGeometryPolygon","geometry":{"rings":[[[418000,4584800],[418000,4585000],[418500,4585000],[418500,4585000],[418000,4584800]]]}}&reshaper={"paths":[[[418200,4584875],[417500,4584875],[417500,4584975],[418200,4584975]]]}&f=json&token=WgTR74xQdSvkHVECel6pSEijFKWafsP3g9DLA8WYg1sD3ycDBOx4g-Vj_i4xHhus

and related response:

{
 "geometryType": "esriGeometryPolygon",
 "geometry": {"rings": [[
  [418000,4584875],[417500,4584875],[417500,4584975],[418000,4584975],
  [418000,4585000],[418500,4585000],[418187.5,4584875],[418000,4584875]
 ]]}
}

Service parameters

Parameter

Description

f

Response format

Valid values: html | json
Default value: html

target

Geometry to be modified. The syntax of this parameter should be:

{
"geometryType" : ""
"geometry" : [ ]
}

reshaper

Single polyline used for the reshaping.

The syntax of this parameter should be:

{
"paths" :
}

sr

Reference system identifier related to geometries

token

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

Additiona information