mirrored listing x402 eip155:8453

Clip polygons to their common area: how much of a parcel falls inside a flood zone, where

Clip polygons to their common area: how much of a parcel falls inside a flood zone, where two service areas overlap, what a boundary and a study area share. Pair it with POST /v1/geometry/area to turn the overlap into square metres. Disjoint input answers geojson:null with empty:true, which is a real answer and not an error, so check empty rather than treating null as a failure. Send a FeatureCollection of Polygons or MultiPolygons; the answer is the common area as a single Feature. Clipping is planar in longitude/latitude, so edges are straight in degrees rather than geodesics. The 2000-position cap is CPU rather than bandwidth: the sweep-line overlay is quadratic on self-intersecting input. Input is EPSG:4326 only. Limits: 2000 positions across all members, 1 MiB request body, and at least two polygonal geometries or the call is refused.

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": {
          "geojson": {
            "features": [
              {
                "geometry": {
                  "coordinates": [
                    [
                      [
                        -150,
                        61
                      ],
                      [
                        -149.9,
                        61
                      ],
                      [
                        -149.9,
                        61.1
                      ],
                      [
                        -150,
                        61.1
                      ],
                      [
                        -150,
                        61
                      ]
                    ]
                  ],
                  "type": "Polygon"
                },
                "properties": null,
                "type": "Feature"
              },
              {
                "geometry": {
                  "coordinates": [
                    [
                      [
                        -149.95,
                        61.05
                      ],
                      [
                        -149.85,
                        61.05
                      ],
                      [
                        -149.85,
                        61.15
                      ],
                      [
                        -149.95,
                        61.15
                      ],
                      [
                        -149.95,
                        61.05
                      ]
                    ]
                  ],
                  "type": "Polygon"
                },
                "properties": null,
                "type": "Feature"
              }
            ],
            "type": "FeatureCollection"
          }
        },
        "bodyType": "json",
        "method": "POST",
        "type": "http"
      },
      "output": {
        "example": {
          "empty": false,
          "geojson": {
            "geometry": {
              "coordinates": [
                [
                  [
                    -149.95,
                    61.05
                  ],
                  [
                    -149.9,
                    61.05
                  ],
                  [
                    -149.9,
                    61.1
                  ],
                  [
                    -149.95,
                    61.1
                  ],
                  [
                    -149.95,
                    61.05
                  ]
                ]
              ],
              "type": "Polygon"
            },
            "properties": null,
            "type": "Feature"
          },
          "inputGeometries": 2,
          "inputVertices": 10,
          "notes": [
            "Vertices are treated as planar in longitude/latitude, which is what every polygon-clipping library does. Edges are straight in degrees, not geodesics; on edges spanning more than a degree or so the two differ."
          ],
          "op": "intersect",
          "outputVertices": 5
        },
        "type": "json"
      }
    },
    "schema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "properties": {
        "input": {
          "additionalProperties": false,
          "properties": {
            "body": {
              "additionalProperties": false,
              "properties": {
                "geojson": {
                  "description": "A GeoJSON FeatureCollection or GeometryCollection holding two or more Polygons or MultiPolygons in EPSG:4326. At most 2000 positions across all members. Anything non-polygonal is rejected.",
                  "type": "object"
                }
              },
              "required": [
                "geojson"
              ],
              "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/intersect"
# -> 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/intersect");
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/intersect")
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/6758.json, and this resource appears in /discovery/resources and /discovery/search.