Convex Hull
- URL:http:// <geometryservice-url>/convexHull
- Version Introduced:10.0
Description
The convexHull operation is performed on a geometry service resource. It returns the convex hull of the input geometry. The input geometry can be a point, multipoint, polyline, or polygon. The convex hull is typically a polygon but can also be a polyline or point in degenerate cases.
You can provide arguments to the convexHull operation as query parameters defined in the following parameters table:
Request parameters
Parameter |
Details |
---|---|
f |
Description: (Optional) The response format. The default response format is html. Values: html | json |
geometries |
Description: The geometries whose convex hull is to be created. The structure of each geometry is the same as the structure of the JSON geometry objects returned by the ArcGIS REST API. JSON Structures: Syntax:
Example:
|
sr |
Description: The well-known ID or a spatial reference JSON object for the output geometry. For a list of valid WKID values, see Projected coordinate systems and Geographic coordinate systems. |
Example usage
In this example, the convex hull is computed for three points.
JSON response syntax
{
"geometryType" : "<esriGeometryPoint | esriGeometryMultipoint | esriGeometryPolyline | esriGeometryPolygon>"
"geometry" : { <geometry1> }
}
JSON response example
{
"geometryType": "esriGeometryPolygon",
"geometry":
{
"rings":
[
[[-116,33],[-117,34],[-116.5,34.5],[-116,33]]
]
}
}