Reshape
- URL:http:// <geometryservice-url>/reshape
- Version Introduced:10.0
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.
From 10.1 onwards this operation will call Simplify on the input target and reshaper geometries.
You can provide arguments to the reshape operation as query parameters defined in the parameters table below.
Request 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. JSON Structures: Syntax:
Example:
|
reshaper |
Description: The single-part polyline that does the reshaping. JSON Structures: Syntax:
Example:
|
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={"geometryType" : "esriGeometryPolygon","spatialReference" :{"wkid" : 2229},"geometry" :{"rings" : [[[6807691.607592106,1841423.2521413565],[6807403.895241022,1841226.589476943],[6807330.383577019,1841176.5013225228],[6807144.497465864,1841049.4458023459],[6806716.6797519475,1840757.4020951092],[6806479.870514274,1840595.731486693],[6806183.101422772,1840393.1846476793],[6806075.24238652,1840319.1683915257],[6805779.309579447,1840125.002769351],[6805524.879970193,1839930.444431439],[6804797.212462276,1841029.5203172714],[6804973.141244277,1841152.8425771892],[6805745.21122244,1841695.4566494375],[6806023.85141319,1841890.9388700128],[6806319.65692395,1842098.571656853],[6806763.038583115,1842410.1881596],[6806913.661969528,1842516.0485121906],[6807150.782230198,1842187.7000875175],[6807308.85212402,1841967.8783486933],[6807691.258839533,1841423.802665189]]]}} &reshaper={"paths" : [[[6804973.141244277,1841152.8425771892],[6804797.212462276,1841029.5203172714],[6804463.906370357,1841533.088863939],[6804224.755601943,1841930.77901344],[6804233.406175196,1842251.835129857],[6804206.368171528,1843554.492957607],[6805395.769992188,1843570.1779655963],[6805514.211684436,1843607.5194263458],[6805740.688921779,1843619.888168022],[6806080.253859445,1843657.1859936863],[6806290.270171687,1843380.829262942],[6806717.911376774,1842787.4210009426],[6806913.661969528,1842516.0485121906],[6806763.038583115,1842410.1881596],[6806319.65692395,1842098.571656853],[6806027.585329607,1841887.9188629389],[6805745.21122244,1841695.4566494375],[6804969.741316691,1841150.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]
]
]
}
}