FRAMES | NO FRAMES Description | Parameters | Examples | Response
Reshape (Operation)

This is an archive of a previous version of the ArcGIS REST API. The current version can be found at http://resources.arcgis.com/en/help/arcgis-rest-api/

URL http://<geometryservice-url>/reshape
Parent Resource Geometry Service

Description

The reshape operation is performed on a geometry service resource. It reshapes a polyline or a part of a polygon using a reshaping line.

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

Parameters

Parameter Details
f Description: The response format. The default response format is html.

Values: html | json
target Description: The polyline or polygon to be reshaped.

Syntax and Examples:

JSON Structures:

Syntax:
{
"geometryType" : "<esriGeometryPolyline | esriGeometryPolygon>"
"geometry" : <geometry>
}
Example:
{
"geometryType" : "esriGeometryPoint",
"geometry" : { "rings" : [ [[-117,34],[-116,34],[-117,33],[-117,34]], [[-115,44],[-114,43],[-115,43],[-115,44]] ] }
}
reshaper Description: The single-part polyline that does the reshaping.

Syntax and Examples:

JSON Structures:

Syntax:
{
"paths" : <polyline>
}
Example:
 {
  "paths" : [
   [[-117,34],[-116,34],[-117,33]],
   [[-115,44],[-114,43],[-115,43]]
  ]
 }
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 Usage

Example 1: Reshape a polygon using a polyline reshaper

http://sampleserver3.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer/reshape?
sr=2229
&target={%22geometryType%22+%3A+%22esriGeometryPolygon%22%2C%22spatialReference%22+%3A{%22wkid%22+%3A+2229}%2C%22geometry%22+%3A{%22rings%22+%3A+[[[6807691.607592106%2C1841423.2521413565]%2C[6807403.895241022%2C1841226.589476943]%2C[6807330.383577019%2C1841176.5013225228]%2C[6807144.497465864%2C1841049.4458023459]%2C[6806716.6797519475%2C1840757.4020951092]%2C[6806479.870514274%2C1840595.731486693]%2C[6806183.101422772%2C1840393.1846476793]%2C[6806075.24238652%2C1840319.1683915257]%2C[6805779.309579447%2C1840125.002769351]%2C[6805524.879970193%2C1839930.444431439]%2C[6804797.212462276%2C1841029.5203172714]%2C[6804973.141244277%2C1841152.8425771892]%2C[6805745.21122244%2C1841695.4566494375]%2C[6806023.85141319%2C1841890.9388700128]%2C[6806319.65692395%2C1842098.571656853]%2C[6806763.038583115%2C1842410.1881596]%2C[6806913.661969528%2C1842516.0485121906]%2C[6807150.782230198%2C1842187.7000875175]%2C[6807308.85212402%2C1841967.8783486933]%2C[6807691.258839533%2C1841423.802665189]]]}}
&reshaper={%22paths%22+%3A+[[[6804973.141244277%2C1841152.8425771892]%2C[6804797.212462276%2C1841029.5203172714]%2C[6804463.906370357%2C1841533.088863939]%2C[6804224.755601943%2C1841930.77901344]%2C[6804233.406175196%2C1842251.835129857]%2C[6804206.368171528%2C1843554.492957607]%2C[6805395.769992188%2C1843570.1779655963]%2C[6805514.211684436%2C1843607.5194263458]%2C[6805740.688921779%2C1843619.888168022]%2C[6806080.253859445%2C1843657.1859936863]%2C[6806290.270171687%2C1843380.829262942]%2C[6806717.911376774%2C1842787.4210009426]%2C[6806913.661969528%2C1842516.0485121906]%2C[6806763.038583115%2C1842410.1881596]%2C[6806319.65692395%2C1842098.571656853]%2C[6806027.585329607%2C1841887.9188629389]%2C[6805745.21122244%2C1841695.4566494375]%2C[6804969.741316691%2C1841150.3071491867]]]}
&f=html

JSON Response Syntax

{
"geometryType" : "<esriGeometryPolyline | esriGeometryPolygon>"
"geometry" :
<geometry>
}

JSON Response Example

{
  "geometryType" : "esriGeometryPolygon", 
  "geometry" : 
  {
    "rings" : 
    [
      [
        [6804973.14124422, 1841152.84257714], 
        [6804797.21246222, 1841029.52031723], 
        [6804463.9063703, 1841533.08886389], 
        [6804224.75560188, 1841930.7790134], 
        [6804233.40617514, 1842251.83512981], 
        [6804206.36817147, 1843554.49295756], 
        [6805395.76999214, 1843570.17796557], 
        [6805514.21168439, 1843607.51942632], 
        [6805740.68892172, 1843619.88816798], 
        [6806080.25385939, 1843657.18599364], 
        [6806290.27017164, 1843380.8292629], 
        [6806717.91137671, 1842787.4210009], 
        [6806913.66196947, 1842516.04851215], 
        [6806763.03858306, 1842410.18815956], 
        [6806319.65692389, 1842098.57165681], 
        [6806027.58532955, 1841887.91886289], 
        [6805745.21122238, 1841695.45664939], 
        [6804973.14124422, 1841152.84257714]
      ]
    ]
  }
}