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

Use dark colors for code blocksCopy
1
2
3
4
{
  "geometryType": "<esriGeometryPolyline | esriGeometryPolygon>",
  "geometry": <geometry>
}

Example

Use dark colors for code blocksCopy
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

Use dark colors for code blocksCopy
1
{"paths": <polyline>}

Example

Use dark colors for code blocksCopy
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 sample request URL for reshape that demonstrates how to reshape a polygon using a polyline reshaper:

Use dark colors for code blocksCopy
1
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]]]}&f=html

JSON Response syntax

Use dark colors for code blocksCopy
1
2
3
4
{
  "geometryType": "<esriGeometryPolyline | esriGeometryPolygon>",
  "geometry": <geometry>
}

JSON Response example

Use dark colors for code blocksCopy
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
42
43
44
45
{
  "geometryType": "esriGeometryPolygon",
  "geometry": {
    "rings": [
      [
        [
          -116.49999999999994,
          33.000000000000057
        ],
        [
          -116.49999999999994,
          32.500000000000057
        ],
        [
          -116.74999999999994,
          32.500000000000057
        ],
        [
          -116.74999999999994,
          33.000000000000057
        ],
        [
          -116.99999999999994,
          33.000000000000057
        ],
        [
          -116.99999999999994,
          34.000000000000057
        ],
        [
          -115.99999999999994,
          34.000000000000057
        ],
        [
          -115.99999999999994,
          33.000000000000057
        ],
        [
          -116.49999999999994,
          33.000000000000057
        ]
      ]
    ]
  }
}

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