- URL:
- https://<root>/Utilities/Geometry/GeometryServer/convexHull
- Methods:
GET
- Version Introduced:
- 10.0
Description
The convex
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 convex
operation as query parameters defined in the following parameters table.
Request parameters
Parameter | Details |
---|---|
| Specifies 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 ArcGIS REST API. Syntax:
Example:
|
| Specifies the well-known ID (WKID) or a spatial reference JSON object for the output |
| The response format. The default response format is Values: |
Example usage
The following is a sample request URL for convex
:
https://sampleserver6.arcgisonline.com/ArcGIS/rest/Utilities/services/Geometry/GeometryServer/convexHull?geometries={"geometryType":"esriGeometryPoint","geometries":[{"x":-117,"y":34},{"x":-116.5,"y":34.5},{"x":-116,"y":33}]}&sr=4326&f=pjson
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
]
]
]
}
}