Calculate Centroid
centroid_toolCalculate the geometric center of a polygon or multipolygon from coordinates to find the arithmetic mean position of all points offline without API calls.
Instructions
Calculate the geometric center (centroid) of a polygon or multipolygon. The centroid is the arithmetic mean position of all points in the shape. Works offline without API calls.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"geometry": "<geometry>"
},
"name": "centroid_tool"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| geometry | Yes | Polygon or MultiPolygon coordinates. Polygon: array of rings (first is outer, rest are holes). MultiPolygon: array of polygons. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| centroid | Yes |