Reshape

URL:
https://<root>/Utilities/Geometry/GeometryServer/reshape
Methods:
GET
Version Introduced:
10.0

Description

The reshape operation is performed on a geometry service resource. It reshapes a polyline or polygon feature by constructing a polyline over the feature. The feature takes the shape of the reshaper polyline from the first place the reshaper intersects the feature to the last. At 10.1 and later, this operation calls simplify on the input target and reshaper geometries.

You can provide arguments to the reshape operation as query parameters defined in the following parameters table.

Request parameters

ParameterDetails

target

Specifies the polyline or polygon to be reshaped.

Syntax

1
2
3
4
{
  "geometryType": "<esriGeometryPolyline | esriGeometryPolygon>",
  "geometry": <geometry>
}

Example

1
2
3
4
5
6
7
8
9
{
  "geometryType": "esriGeometryPolygon",
  "geometry": {
    "rings": [
      [[-117,34],[-116,34],[-117,33],[-117,34]],
      [[-115,44],[-114,43],[-115,43],[-115,44]]
    ]
  }
}

reshaper

Specifies the single-part polyline that does the reshaping.

Syntax

1
{"paths": <polyline>}

Example

1
2
3
4
5
{
  "paths": [
    [[-116.9,33.8],[-116.9,33],[-116,33],[-116,33.8]]
  ]
}

sr

Specifies 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 Using spatial references.

f

The response format. The default format is html .

Values: html | json | pjson

Example usage

The following is a decoded sample request URL (the actual request must be encoded) for reshape that demonstrates how to reshape a polygon using a polyline reshaper:

https://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/Geometry/GeometryServer/reshape?sr=4326&target={"geometryType":"esriGeometryPolygon","geometry":{"rings":[[[-117,34],[-116,34],[-116,33],[-117,33],[-117,34]]]}}&reshaper={"paths":[[[-116.75,33.5],[-116.75,32.5],[-116.5,32.5],[-116.5,33.5]]]}

JSON Response syntax

1
2
3
4
{
  "geometryType": "<esriGeometryPolyline | esriGeometryPolygon>",
  "geometry": <geometry>
}

JSON Response example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{
 "geometryType": "esriGeometryPolygon",
 "geometry": {"rings": [[
  [
   -116.49999999999994,
   33.00000000000006
  ],
  [
   -116.49999999999994,
   32.50000000000006
  ],
  [
   -116.74999999999994,
   32.50000000000006
  ],
  [
   -116.74999999999994,
   33.00000000000006
  ],
  [
   -116.99999999999994,
   33.00000000000006
  ],
  [
   -116.99999999999994,
   34.00000000000006
  ],
  [
   -115.99999999999994,
   34.00000000000006
  ],
  [
   -115.99999999999994,
   33.00000000000006
  ],
  [
   -116.49999999999994,
   33.00000000000006
  ]
 ]]}
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close