← Home

geo

Deterministic geospatial calculations for AI agents.

An LLM asked the distance between two cities will produce a number that feels right but is often kilometres off. Great-circle distance, initial bearing, destination points, polygon areas, and coordinate format conversions all require exact geodesic math. Euclid's geo tool uses Haversine and Vincenty-class algorithms on the WGS84 ellipsoid — no approximation, no hallucinated coordinates.


Live

euclid / geo
geo({ operation: "distance", from: { lat: -33.87, lon: 151.21 }, to: { lat: -36.85, lon: 174.76 } }){ "distance_km": 2155.5, "method": "haversine" }
geo({ operation: "bearing", from: { lat: 51.51, lon: -0.13 }, to: { lat: 48.86, lon: 2.35 } }){ "bearing_degrees": 148.04 }
geo({ operation: "midpoint", from: { lat: 40.71, lon: -74.01 }, to: { lat: 34.05, lon: -118.24 } }){ "lat": 39.51, "lon": -97.16 }
geo({ operation: "destination", from: { lat: 51.51, lon: -0.13 }, bearing: 90, distance: 50, unit: "km" }){ "lat": 51.51, "lon": 0.59 }

Operations

distance (Haversine / Vincenty)bearingmidpointdestination pointbounding boxpolygon areapoint in polygonDMS ↔ decimallat/lon ↔ UTM

Examples

What it looks like in practice

Distance between two cities for a logistics route

geo({ operation: "distance", from: { lat: -33.87, lon: 151.21 }, to: { lat: -36.85, lon: 174.76 } })

{ "distance_km": 2155.5, "method": "haversine" }

Initial bearing for maritime navigation

geo({ operation: "bearing", from: { lat: 51.51, lon: -0.13 }, to: { lat: 48.86, lon: 2.35 } })

{ "bearing_degrees": 148.04 }

Finding the midpoint of a delivery zone

geo({ operation: "midpoint", from: { lat: 40.71, lon: -74.01 }, to: { lat: 34.05, lon: -118.24 } })

{ "lat": 39.51, "lon": -97.16 }

Destination point for a drone flight plan

geo({ operation: "destination", from: { lat: 51.51, lon: -0.13 }, bearing: 90, distance: 50, unit: "km" })

{ "lat": 51.51, "lon": 0.59 }

Bounding box for a store locator radius search

geo({ operation: "bounding_box", center: { lat: -37.81, lon: 144.96 }, radius: 25, unit: "km" })

{ "north": -37.58, "south": -38.04, "east": 145.24, "west": 144.68 }

Converting surveyor coordinates to decimal degrees

geo({ operation: "dms_to_decimal", degrees: 51, minutes: 30, seconds: 26, direction: "N" })

{ "decimal": 51.507222 }


Who uses this

Built for agents across every domain

fn()

Logistics planner

An agent computing great-circle distances between distribution centres — where a 50km error changes which warehouse fulfils an order.

fn()

Maritime navigator

Computing initial bearings and destination points for route planning. A one-degree bearing error at 500 nautical miles means arriving in the wrong port.

fn()

Real estate analyst

Generating bounding boxes for radius searches and computing polygon areas for land parcels — where accuracy determines property valuations.

fn()

Drone operator

Calculating destination coordinates from a launch point, bearing, and distance for autonomous flight paths that must comply with airspace regulations.

fn()

Surveyor

Converting between DMS, decimal degrees, and UTM coordinates from field measurements — where a format error compounds across an entire cadastral survey.

fn()

Emergency services

An AI dispatch agent running point-in-polygon tests to determine which response zone a caller's coordinates fall within. Wrong zone, wrong crew.


Try geo on Euclid Cloud

One MCP connection. Every computation your agents need.

Get started