FRAMES | NO FRAMES Description | Parameters | Examples | Response
Simplify Geometries (Operation)
URL http://<geometryservice-url>/simplify
Parent Resource Geometry Service

Description

The simplify operation is performed on a geometry service resource. Simplify permanently alters the input geometry so that the geometry becomes topologically consistent. This resource applies the ArcGIS simplify operation to each geometry in the input array. For more information, see ITopologicalOperator.Simplify Method and IPolyline.SimplifyNetwork Method.

You can provide arguments to the simplify 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
geometries Description: The array of geometries to be simplified. The structure of each geometry in the array is same as the structure of the json geometry objects returned by the ArcGIS REST API.

Syntax and Examples:

JSON Structures:

Syntax:
{
"geometryType" : "<esriGeometryPoint | esriGeometryMultipoint | esriGeometryPolyline |
esriGeometryPolygon>"
"geometries" : [ <geometry1>, <geometry2> ]
}

The "geometries" property is an array of input geometries. All geometries in this array should be of the type defined by "geometryType".

Example:
{
"geometryType" : "esriGeometryPoint",
"geometries" : [
{"x" : -104.53, "y" : 34.74},
{"x" : -63.53, "y" : 10.23}
]
}

Simple Syntax for point geometries:

When using points, in addition to the JSON structures, you can specify the geometries with a simpler comma-separated syntax.

Syntax: geometries=x1, y1, x2, y2, ..., xn, yn
Example: geometries=-104.53, 34.74, -63.53, 10.23

URL based:

For a large set of geometries, you can specify a URL to the input geometries stored in a JSON structure in a file on a public server. The expected format of the file’s contents will be exactly the same as that expected if the geometries were directly embedded in the request.

Syntax: geometries={ "url" : "<URL to file>" }
Example: geometries={ "url" : "http://myserver/mygeometries/afile.txt" }

sr Description: The well-known ID of the spatial reference or a spatial reference json object for the input and output geometries.

Example Usage

Example 1: In this example, a polygon with one ring is simplified into a polygon with two rings.

http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer/simplify?
sr=4326&
geometries={"geometryType":"esriGeometryPolygon","geometries":[{"rings":[[[-117,34],[-115,36],[-115,33],[-117,36],[-117,34]]]}]}

JSON Response Syntax

{
"geometries" : [
<geometry1>, <geometry2> ]
}

JSON Response Example

{
"geometries" : [
{
"paths" : [
[ [13,21], [13,62], [35,73] ],
[ [23,23], [43,64], [45,52] ]
]
},
{
"paths" : [
[ [53.248,60.991], [-53,50] ],
[ [53.248,60.991], [62.0,-44.999], [-64,40] ],
[ [62.999,62], [53.248,60.991] ],
[ [53,64], [53.248,60.991] ]
]
}
]
}