Coordinate axis-order and unit check from a CRS and its area of use

$0.005 USDC per call · Developer and security · POST /api/v1/geo-axis-check · Id geo-axis-check

Checks up to 1000 coordinate pairs (or one bounding box) against the EPSG coordinate system you name, for agents handling GIS or map data: it flags longitude/latitude swaps, degrees supplied where metres are expected (or the reverse), values outside the CRS's area of use, and inverted bounds, with the point index and values. It does not reproject, geocode, validate geometry topology or datum, or judge accuracy. Projected systems other than EPSG:3857 have no projection math here, so only unit mix-ups are detected for them and a clean result is `unknown`, not `pass`.

What you get

A swapped lat/lon pair puts a Sydney warehouse in Antarctica; the swap is detectable from the CRS's area of use before it is plotted or stored.

Call it

Send the JSON body below to https://agents.writerslogic.com/api/v1/geo-axis-check. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.

curl -i -X POST https://agents.writerslogic.com/api/v1/geo-axis-check \
  -H 'content-type: application/json' \
  -d '{"crs":"EPSG:4326","coordinates":[[51.5074,-0.1278],[-0.1278,51.5074],[4500000,5600000]],"declaredOrder":"lat-lon"}'

Input

FieldTypeRequiredDescription
crsstring; length 0..80yesEPSG code in any common form (EPSG:4326, 4326, urn:ogc:def:crs:EPSG::4326) or CRS84. See versions for the snapshot of known codes; others return unknown unless areaOfUse is supplied.
coordinatesarray<array<number>; max 2 items>; max 1000 itemsno[first, second] pairs exactly as they appear in the data.
boundsarray<number>; max 4 itemsno[minFirst, minSecond, maxFirst, maxSecond] in the data's own order; its two corners are checked like points and min must not exceed max.
declaredOrderstring; one of "lon-lat", "lat-lon", "easting-northing", "northing-easting"noWhat the data claims: lon-lat or easting-northing means the first value is the east axis; lat-lon or northing-easting means north first. Default: the CRS's EPSG authority order (CRS84: lon-lat).
areaOfUsearray<number>; max 4 itemsno[south, west, north, east] degrees; overrides the snapshot for a geographic CRS or supplies one for an unknown geographic code.

Example request body

{
  "crs": "EPSG:4326",
  "coordinates": [
    [
      51.5074,
      -0.1278
    ],
    [
      -0.1278,
      51.5074
    ],
    [
      4500000,
      5600000
    ]
  ],
  "declaredOrder": "lat-lon"
}

Result

The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.

FieldTypeRequiredDescription
statusstring; one of "pass", "fail", "unknown", "unsupported"nopass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass.
crsobjectno
interpretedOrderstringnoThe order used to read the pairs.
pointsarray<object>no
countsobjectnoPoints per verdict.
witnessesarray<object>no
versionsobjectnoEvery semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile).
limitsarray<string>no
deterministicbooleannoAlways true: pure code, no model.

Pay and connect

Available through: x402 (USDC on Base), MCP. MCP clients reach it through the infra-preflight-kit package.

Machine-readable