Convex Hull

The “convexHull” allows to remotely calculate the smallest convex polygon that includes all the points of a geometry specified by the user.

The following figure shows the creation of the polygon resulting from the operation (beige filled-in and perimeter line in brown) from the specific geometry points displayed (black dots).

Example of request:

http://galileo.icc.cat/arcgis/rest/services/Utilities/Geometry/GeometryServer/convexHull?f=json&sr={"wkid":23031}&geometries={"geometryType":"esriGeometryPoint","geometries":[{"x":382056.3656376209,"y":4615479.559079202,"spatialReference":{"wkid":23031}},{"x":383769.9977477596,"y":4613133.403765819,"spatialReference":{"wkid":23031}},{"x":381907.11133034533,"y":4610676.972430504,"spatialReference":{"wkid":23031}}]}&token=WgTR74xQdSvkHVECel6pSEijFKWafsP3g9DLA8WYg1sD3ycDBOx4g-Vj_i4xHhus

and related response:

{"geometryType":"esriGeometryPolygon","geometry":{"rings":[[[381907.11133034533,4610676.9724305039],[382056.36563762091,4615479.5590792019],[383769.99774775963,4613133.403765819],[381907.11133034533,4610676.9724305039]]]}}

Service Parameters

Parameter

Description

f

Response format

Valid values: html | json
Deafult value: html

geometries

Array of geometries of which the smallest convex polygon that includes its points is wanted to be generated. The syntax of this parameter should be:

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

sr

Reference system identifier used to  describe geometry resulting from operation

token

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

Additional information

Example Usage