Geolocation Utilities

Polygon Area

Calculate the precise surface area of any polygon on Earth using geodetic calculations. Pass coordinates via GET /v1/geo/polygon-area and receive area in square meters, accounting for Earth's curvature. Perfect for land surveys, property calculations, or geographic analysis in Cursor and other MCP-enabled editors. Uses spherical geometry for accuracy over large regions.

API Endpoint

GET /v1/geo/polygon-area

Code Examples

curl "https://tinyfn.io/v1/geo/polygon-area" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/geo/polygon-area', {
  headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests

response = requests.get('https://tinyfn.io/v1/geo/polygon-area',
    headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)

Use via MCP

Add to your AI agent

Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's geolocation tools:

{
  "mcpServers": {
    "tinyfn-geo": {
      "url": "https://tinyfn.io/mcp/geo",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Learn more about MCP setup →

FAQ

How do I calculate polygon area with coordinates using MCP?

Pass an array of lat/lng coordinate pairs to the polygon-area tool. The coordinates should form a closed polygon (first and last points can be the same). Returns area in square meters.

What coordinate format does the polygon area calculator accept?

Accepts decimal degrees in [latitude, longitude] format. Example: [[40.7128, -74.0060], [40.7589, -73.9851], [40.7505, -73.9934]].

Does polygon area calculation account for Earth's curvature?

Yes, it uses geodetic calculations that account for Earth's spherical shape, making it accurate for large polygons where flat-plane geometry would introduce significant errors.

What's the difference between this and simple coordinate math?

Simple coordinate math treats Earth as flat, causing major errors over large areas. This tool uses spherical geometry for true surface area on Earth's curved surface.

Can I convert the square meter result to other units?

The API returns square meters. For other units: divide by 10,764 for square feet, 4,047 for acres, or 1,000,000 for square kilometers.

Try Polygon Area Now

Get your free API key and start using Polygon Area in seconds.

Get Free API Key