FRAMES | NO FRAMES | Description | Parameters | Examples | Response |
URL | http://<geometryservice-url>/generalize |
---|---|
Parent Resource | Geometry Service |
The generalize operation is performed on a geometry service resource. It returns generalized (Douglas-Poiker) versions of the input geometries.
You can provide arguments to the generalize operation as query parameters defined in the parameters table below.
Parameter | Details |
---|---|
f | Description: The response format.
The default response format is html. Values: html | json |
geometries | Description: The array of
geometries to be generalized. The spatial reference of the geometries is
specified by sr . 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:{ The { "geometryType" : "esriGeometryPolyline", "geometries" : [ { "paths" : [ [[-117,34],[-116,34],[-117,33]], [[-115,44],[-114,43],[-115,43]] ] }, { "paths" : [ [[32.49,17.83],[31.96,17.59],[30.87,17.01],[30.11,16.86]] ] } ] } |
sr |
Description: The well-known ID or a spatial reference json object for the input geometries . For a list of valid
WKID values, see Projected coordinate Systems
and Geographic coordinate Systems.
|
maxDeviation | Description : Specifies the maximum deviation for constructing a generalized geometry based on the input geometries. |
deviationUnit (optional) | Description : A unit for maximum deviation. If unit is not specified, the units are derived from sr. For a list of valid units, see esriSRUnitType Constants and esriSRUnit2TypeConstants. |
Example 1: In this example, a polygon is generalized.
http://sampleserver3.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer/generalize?{ "geometryType" : "<esriGeometryPolyline | esriGeometryPolygon>" "geometries" : [ <geometry1>, <geometry2> ] }
{ "geometryType" : "esriGeometryPolygon", "geometries" : [ { "rings" : [ [ [-87.0993428200112, 40.2280845437584], [-87.1002958107611, 40.5769481766314], [-86.7002172326945, 40.5746409065304], [-86.7042289380646, 40.2258439156391], [-87.0993428200112, 40.2280845437584] ] ] } ] }