Geometry primitivesFree tier

hex_neighbors

List all H3 cells within ring k of an input cell, including each cell's centroid (lat, lon). Pairs naturally with density_grid for ring-based spatial expansion in batch feature engineering.

Use cases

  • Expand a single H3 cell into its k-ring neighborhood for ring-aggregated features.
  • Build a “cells around me” query for a hex-based UI.
  • Pre-compute spatial bins around a candidate location for clustering.

Arguments

NameTypeRequiredDescription
h3_cell string required 15- or 16-char H3 hex id.
ring integer optional Ring distance.
Range 0 – 10. Default 1.

Example request

curl
bash
curl -X POST https://mcp.qubitdata.it/mcp \
  -H "Authorization: Bearer $QUBITDATA_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "hex_neighbors",
      "arguments": {
            "h3_cell": "891fb466357ffff",
            "ring": 2
      }
    }
  }'

Example response

JSON-RPC 2.0 result
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "[\n  { \"h3_cell\": \"891fb466357ffff\", \"lat\": 45.4641, \"lon\": 9.1903, \"ring\": 0 },\n  { \"h3_cell\": \"891fb466353ffff\", \"lat\": 45.4658, \"lon\": 9.1888, \"ring\": 1 }\n]"
      }
    ]
  }
}

Prompts to try

Drop these into Claude Desktop, Cursor, or any MCP-aware client wired to https://mcp.qubitdata.it/mcp.

  • Claude Desktop
    Give me all H3 cells in ring 2 of 891fb466357ffff.
  • Cursor
    Expand each cell from my density_grid result by hex_neighbors(ring=1) for ring features.
  • Custom MCP client
    Build a hex neighborhood snapshot for batch feature engineering.

Related tools

density_grid · spatial_search

Get started

Sign up for a free key to call this tool from your agent. Need a wider geo cap or higher quota? See pricing.

Last updated: