Generalize

The “generalize” operation allows to remotely calculate generalized versions (according to Douglas-Poiker algorithms) of geometries specified by the user.

Example of request:

http://galileo.icc.cat/arcgis/rest/services/Utilities/Geometry/GeometryServer/generalize?sr=25831&geometries={"geometryType":"esriGeometryPolygon","geometries":[{"rings":[[[418500,4584900],[418000,4584900],[418000,4585000],[418500,4585000],[418500,4584900]]]},{"rings":[[[418000,4584900],[418500,4584900],[418500,4584800],[418000,4584800],[418000,4584900]]]}]}&maxDeviation=100&deviationUnit=9036&f=json&token=WgTR74xQdSvkHVECel6pSEijFKWafsP3g9DLA8WYg1sD3ycDBOx4g-Vj_i4xHhus

and related response:

{
  "geometryType": "esriGeometryPolygon",
  "geometries": [
   {"rings": [[
     [418500,4584900],[418000,4584900],[418000,4585000],[418500,4584900]
   ]]},
   {"rings": [[
     [418000,4584900],[418500,4584900],[418500,4584800],[418000,4584900]
   ]]}
  ]
}

Service parameters

Parameter

Description

f

Response format

Valid values: html | json
Default value: html

geometries

Array of geometries to be generalized.  The syntax of this parameter should be:

{
"geometryType" : ""
"geometries" : [ , ]
}

sr

Reference system identifier used to describe geometries.

maxDeviation

Specifies the maximum deviation for constructing a generalized geometry from the originals.

deviationUnit

Unit of distance used to define the parameter “maxDeviation”. See a list of possible values

token

Required security key in order to perform this function which is generated by filling in the corresponding form.

Additional information