- URL:
- https://<root>/Utilities/Geometry/GeometryServer/generalize
- Methods:
GET
- Version Introduced:
- 10.0
Description
The generalize
operation is performed on a geometry service resource. The generalize
operation simplifies the input geometries using the Douglas-Peucker algorithm with a specified maximum deviation distance. The output geometries will contain a subset of the original input vertices. You can provide arguments to the generalize
operation as query parameters defined in the following parameters table.
Request parameters
Parameter | Details |
---|---|
| Specifies the array of geometries to be generalized. The spatial reference of the geometries is specified by The Syntax
Example:
|
| Specifies the well-known ID (WKID) or a spatial reference JSON object for the input |
| Sets the maximum allowable offset, which determines the degree of simplification. This value limits the distance the output geometry can differ from the input geometry. |
(Optional) | Specifies a unit for maximum deviation. If a unit is not specified, the units are derived from |
| The response format. The default response format is Values: |
Example usage
The following is a decoded sample request URL (the actual URL must be encoded) for generalize
that demonstrates how a polygon is generalized:
JSON Response syntax
{
"geometryType" : "<esriGeometryPoint | esriGeometryMultipoint | esriGeometryPolyline | esriGeometryPolygon>"
"geometries" : [ <geometry1>, <geometry1>, ..., <geometryN> ]
}
JSON Response example
{
"geometryType": "esriGeometryPolygon",
"geometries": [{"rings": [[
[
-87,
40
],
[
-87.2,
40.6
],
[
-86.7,
40.6
],
[
-87,
40
]
]]}]
}