Coordinate Geometry
live UtilityGeographyGeographic midpoint, centroid of many points, bounding box around a center, and point-in-box test. Complements geodistance & geohash. Keyless, offline.
Tools
midpoint Geographic (great-circle) midpoint between two lat/lon points.
No parameters required.
Try it
centroid Average (spherical) center of a list of lat/lon points. `points` is an array of {lat, lon}.
No parameters required.
Try it
bounding_box Bounding box (SW/NE corners) around a center point at a given radius. `unit` = km (default) or mi.
No parameters required.
Try it
point_in_bbox Test whether a lat/lon point is inside a bounding box "minLat,minLon,maxLat,maxLon".
No parameters required.
Try it
Test with curl
The gateway speaks JSON-RPC 2.0 over HTTP POST. You can test any pack directly from the terminal.
curl -X POST https://gateway.pipeworx.io/coordinates/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' curl -X POST https://gateway.pipeworx.io/coordinates/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"midpoint","arguments":{}}}' Use with the SDK
Install @pipeworx/sdk to call tools from any TypeScript/Node project.
import { Pipeworx } from '@pipeworx/sdk';
const px = new Pipeworx();
const result = await px.call("midpoint", {}); // Or ask in plain English:
const answer = await px.ask("geographic midpoint, centroid of many points, bounding box around a center, and point-in-box test");