mirrored listing x402 eip155:8453

Buffer a geometry by a distance in metres and get the offset polygon back

Buffer a geometry by a distance in metres and get the offset polygon back. Use it for service areas, setbacks, and proximity envelopes you will later test with POST /v1/pip. Accepts any geometry -- point, line, polygon, or a collection of them, each buffered about its own centre latitude -- and answers with a Feature, or a FeatureCollection when you sent several. A buffer that collapses (a negative distance larger than the shape, or any negative distance on a point or a line) answers geojson:null with empty:true, which is an answer and not an error. Geodesic-aware: turf buffers in an azimuthal equidistant plane scaled by a sphere, which is a systematic -0.56% error at the equator running to +0.44% at 80 deg latitude, and this endpoint cancels that by scaling the distance to the Gaussian radius of curvature at the feature's own centre latitude. Measured against GeographicLib the result is then within +/-0.34% of the requested distance at the equator, +/-0.08% at 60 deg, +/-0.04% at 70 deg and +/-0.01% at 80 deg; the residual is the ellipsoid's north-south versus east-west curvature, which no single sphere can represent, and it shrinks towards the poles. Between vertices the polygon edge cuts a further 1 - cos(pi/(4*steps)) inside the true offset curve, 0.054% at the default steps=24. Input is EPSG:4326 only. Limits: 2000 positions across the whole document, 1 MiB request body, distance within +/-1000000 m, steps 1 to 128.

Do you run api.geoprimitives.dev? This listing was mirrored from Coinbase's public Bazaar. Claim it in 30 seconds — no account required — and it becomes verified, permanently overriding the mirrored copy.

Claim this listing
10000 (raw units)
price
1
calls / 30d
1
unique payers
2026-08-21
updated

Provider

api.geoprimitives.dev · discovered, not yet claimed by its owner

Payment (x402 accepts[])

[
  {
    "scheme": "exact",
    "network": "eip155:8453",
    "payTo": "0x76A51b5Dd3729950B3b60c17f19252d221968FCe",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amount": "10000",
    "maxTimeoutSeconds": 300
  }
]

Output schema

{
  "bazaar": {
    "info": {
      "input": {
        "body": {
          "distance": 500,
          "geojson": {
            "coordinates": [
              -149.9003,
              61.2181
            ],
            "type": "Point"
          },
          "steps": 2
        },
        "bodyType": "json",
        "method": "POST",
        "type": "http"
      },
      "output": {
        "example": {
          "accuracy": "Buffer distance is accurate to +/-0.34% at the equator falling to +/-0.01% at 80 deg latitude, plus 1 - cos(pi/(4*steps)) of inward chord error between vertices.",
          "distanceMeters": 500,
          "empty": false,
          "geojson": {
            "geometry": {
              "coordinates": [
                [
                  [
                    -149.8909880026692,
                    61.218099680669816
                  ],
                  [
                    -149.89371476021455,
                    61.2212701612782
                  ],
                  [
                    -149.9003,
                    61.2225835109001
                  ],
                  [
                    -149.90688523978542,
                    61.2212701612782
                  ],
                  [
                    -149.90961199733076,
                    61.218099680669816
                  ],
                  [
                    -149.90688391332412,
                    61.214929519391646
                  ],
                  [
                    -149.9003,
                    61.213616489099905
                  ],
                  [
                    -149.89371608667585,
                    61.214929519391646
                  ],
                  [
                    -149.8909880026692,
                    61.218099680669816
                  ]
                ]
              ],
              "type": "Polygon"
            },
            "properties": null,
            "type": "Feature"
          },
          "inputVertices": 1,
          "notes": [],
          "op": "buffer",
          "radiusScale": 0.9970887085271185,
          "steps": 2
        },
        "type": "json"
      }
    },
    "schema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "properties": {
        "input": {
          "additionalProperties": false,
          "properties": {
            "body": {
              "additionalProperties": false,
              "properties": {
                "distance": {
                  "description": "Buffer distance in metres. Negative erodes a polygon inwards, and collapses a point or a line to nothing. At most 1000000 m either way, because past about 1000 km the azimuthal equidistant plane distorts more than every other error here combined.",
                  "maximum": 1000000,
                  "minimum": -1000000,
                  "type": "number"
                },
                "geojson": {
                  "description": "A GeoJSON Feature, FeatureCollection or Geometry in EPSG:4326, longitude then latitude in degrees. At most 2000 positions across the whole document. Reproject with POST /v1/transform first if your data is in anything else.",
                  "type": "object"
                },
                "steps": {
                  "default": 24,
                  "description": "Segments per quadrant, so four times this many vertices per full circle. Default 24, maximum 128. The polygon edge cuts 1 - cos(pi/(4*steps)) inside the true offset curve: 0.48% at turf's own default of 8, 0.054% at 24, 0.008% at 64.",
                  "maximum": 128,
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "required": [
                "geojson",
                "distance"
              ],
              "type": "object"
            },
            "bodyType": {
              "enum": [
                "json",
                "form-data",
                "text"
              ],
              "type": "string"
            },
            "method": {
              "enum": [
                "POST"
              ],
              "type": "string"
            },
            "type": {
              "const": "http",
              "type": "string"
            }
          },
          "required": [
            "type",
            "method",
            "bodyType",
            "body"
          ],
          "type": "object"
        },
        "output": {
          "properties": {
            "example": {
              "type": "object"
            },
            "type": {
              "type": "string"
            }
          },
          "required": [
            "type"
          ],
          "type": "object"
        }
      },
      "required": [
        "input"
      ],
      "type": "object"
    }
  }
}

Use it

curl

curl "https://api.geoprimitives.dev/v1/geometry/buffer"
# -> 402 Payment Required, accepts[] lists how to pay
# retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paid

JavaScript

const res = await fetch("https://api.geoprimitives.dev/v1/geometry/buffer");
if (res.status === 402) {
  const { accepts } = await res.json();
  // pay one of accepts[] via an x402 client, then retry with the payment header
}

Python

import httpx
res = httpx.get("https://api.geoprimitives.dev/v1/geometry/buffer")
if res.status_code == 402:
    accepts = res.json()["accepts"]
    # pay one of accepts[] via an x402 client, then retry with the payment header

Machine-readable

Everything on this page is also available as clean JSON at /resources/6761.json, and this resource appears in /discovery/resources and /discovery/search.