Skip to content
Fourohtwo

Geometric predicates on a GeoJSON geometry supplied in the request

api.duoleads.com/v1/geo/polygon

Geometric predicates on a GeoJSON geometry supplied in the request: point-in-polygon with correct hole handling, bounding box, centroid, signed area in square metres, perimeter length, and ring winding order. Accepts Polygon and MultiPolygon, and a GeoJSON Feature wrapping either. Area and length are geodesic on the WGS-84 ellipsoid, correct at any latitude; containment is planar in lon/lat.

BaseAnswering
GEThttps://api.duoleads.com/v1/geo/polygon

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://api.duoleads.com/v1/geo/polygon?lat=52.3728&lon=4.8936&geometry=%7B%22type%22%3A%22Polygon%22%2C%22coordinates%22%3A%5B%5B%5B4.85%2C52.35%5D%2C%5B4.95%2C52.35%5D%2C%5B4.95%2C52.40%5D%2C%5B4.85%2C52.40%5D%2C%5B4.85%2C52.35%5D%5D%5D%7D");
console.log(await res.json());

Example input

{
  "lat": "52.3728",
  "lon": "4.8936",
  "geometry": "{\"type\":\"Polygon\",\"coordinates\":[[[4.85,52.35],[4.95,52.35],[4.95,52.40],[4.85,52.40],[4.85,52.35]]]}"
}

More from Duo Data Utilities