Catalog/geo-polygon-perimeter

Geospatial

Geodesic polygon perimeter API

Sums the haversine lengths of every edge of a polygon (or open polyline), returning total perimeter in km and miles plus the per-edge breakdown. Answers 'What is the perimeter of this geofence?', 'How long is the boundary of this polygon?'.

Price$0.04per request
MethodPOST
Route/v1/geo/polygon-perimeter
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
geogispolygonperimetergeodesicboundarygeofencehaversinelength
API URLhttps://x402.hexl.dev/v1/geo/polygon-perimeter
Integration docs
Example request
{
  "polygon": [
    {
      "latitude": 0,
      "longitude": 0
    },
    {
      "latitude": 0,
      "longitude": 1
    },
    {
      "latitude": 1,
      "longitude": 1
    },
    {
      "latitude": 1,
      "longitude": 0
    }
  ]
}
Example response
{
  "vertices": 4,
  "closed": true,
  "perimeterKm": 444.763385,
  "perimeterMiles": 276.363069,
  "segmentKm": [
    111.19508,
    111.19508,
    111.178144,
    111.19508
  ],
  "interpretation": "Closed polygon perimeter 444.763 km across 4 edges."
}
Input schema
{
  "type": "object",
  "required": [
    "polygon"
  ],
  "properties": {
    "polygon": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "latitude": {
            "type": "number"
          },
          "longitude": {
            "type": "number"
          }
        }
      },
      "examples": [
        [
          {
            "latitude": 0,
            "longitude": 0
          },
          {
            "latitude": 0,
            "longitude": 1
          },
          {
            "latitude": 1,
            "longitude": 1
          },
          {
            "latitude": 1,
            "longitude": 0
          }
        ]
      ]
    },
    "closed": {
      "type": "boolean",
      "examples": [
        true
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}