Catalog/geo-convex-hull

Geospatial

Convex hull of points API

Computes the convex hull of a set of coordinates using Andrew's monotone-chain algorithm (cos-latitude projected), returning the ordered boundary vertices that enclose all points. Answers 'What is the smallest convex boundary around these points?', 'Which points form the outer envelope of my cluster?'.

Price$0.08per request
MethodPOST
Route/v1/geo/convex-hull
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
geogisconvex-hullmonotone-chainenvelopeboundaryclustercomputational-geometrypoints
API URLhttps://x402.hexl.dev/v1/geo/convex-hull
Integration docs
Example request
{
  "points": [
    {
      "latitude": 0,
      "longitude": 0
    },
    {
      "latitude": 0,
      "longitude": 2
    },
    {
      "latitude": 2,
      "longitude": 2
    },
    {
      "latitude": 2,
      "longitude": 0
    },
    {
      "latitude": 1,
      "longitude": 1
    }
  ]
}
Example response
{
  "count": 5,
  "hullSize": 4,
  "hull": [
    {
      "latitude": 0,
      "longitude": 0
    },
    {
      "latitude": 0,
      "longitude": 2
    },
    {
      "latitude": 2,
      "longitude": 2
    },
    {
      "latitude": 2,
      "longitude": 0
    }
  ],
  "interpretation": "Convex hull has 4 vertices enclosing all 5 input points (counter-clockwise order)."
}
Input schema
{
  "type": "object",
  "required": [
    "points"
  ],
  "properties": {
    "points": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "latitude": {
            "type": "number"
          },
          "longitude": {
            "type": "number"
          }
        }
      },
      "examples": [
        [
          {
            "latitude": 0,
            "longitude": 0
          },
          {
            "latitude": 0,
            "longitude": 2
          },
          {
            "latitude": 2,
            "longitude": 2
          },
          {
            "latitude": 2,
            "longitude": 0
          },
          {
            "latitude": 1,
            "longitude": 1
          }
        ]
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}