- URL:
- https://<root>/Utilities/Geometry/GeometryServer/simplify
- Methods:
GET
- Version Introduced:
- 9.3
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 simplify
operation to each geometry in the input array. For more information, see ITopologicalOperator.Simplify Method.
You can provide arguments to the simplify
operation as query parameters defined in the following parameters table:
Request parameters
Parameter | Details |
---|---|
|
The response format. The default response format is html. Values: html | json |
| The array of geometries to be simplified. The structure of each geometry in the array is the same as the structure of the JSON geometry objects returned by the ArcGIS REST API. JSON structures: Syntax:
The Example:
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: 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: |
| The well-known ID of the spatial reference or a spatial reference JSON object for the input and output geometries. |
Example usage
In this example, a polygon with one ring is simplified into a polygon with two rings.
https://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/Geometry/GeometryServer/simplify?sr=4326&geometries=%7B%22geometryType%22%3A%22esriGeometryPolygon%22%2C%22geometries%22%3A%5B%7B%22rings%22%3A%5B%5B%5B-117%2C34%5D%2C%5B-115%2C36%5D%2C%5B-115%2C33%5D%2C%5B-117%2C36%5D%2C%5B-117%2C34%5D%5D%5D%7D%5D%7D&f=html
JSON Response syntax
{
"geometries" : [ <geometry1>, <geometry1>, ..., <geometryN> ]
}
JSON Response example
{
"geometries": [
{
"rings": [
[
[
-116.19999999999999,
34.800000000000068
],
[
-116.99999999999994,
34.000000000000057
],
[
-116.99999999999994,
36.000000000000057
],
[
-116.19999999999999,
34.800000000000068
]
],
[
[
-116.19999999999999,
34.800000000000068
],
[
-114.99999999999994,
36.000000000000057
],
[
-114.99999999999994,
33.000000000000057
],
[
-116.19999999999999,
34.800000000000068
]
]
]
}
]
}