Reshape
- URL:https://<geometryservice-url>/reshape
- 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
Parameter |
Details |
---|---|
f |
The response format. The default response format is html. Values: html | json |
target |
The polyline or polygon to be reshaped. JSON structures: Syntax:
Example:
|
reshaper |
The single-part polyline that does the reshaping. JSON structures: Syntax:
Example:
|
sr |
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
Reshape a polygon using a polyline reshaper.
JSON Response syntax
{"geometryType" : "<esriGeometryPolyline | esriGeometryPolygon>", "geometry" : <geometry>}
JSON Response example
{
"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
]
]
]
}
}