AggregationPro tier

density_grid

Aggregate POI counts on an H3 hex grid within a bounding box. One row per non-empty cell with id, centroid (lat, lon), and count. Resolution 7 ≈ 5 km, 8 ≈ 1 km, 9 ≈ 150 m. Perfect for batch feature engineering: enrich a list of properties with a spatial-cell feature without per-row queries.

Use cases

  • Build a heat-map layer of restaurant density across a city.
  • Add a POI count per H3 cell feature to every property in your AVM training set.
  • Compare two areas by their POI distribution at fixed H3 resolution.
  • Profile a candidate retail location by density of competing categories nearby.

Arguments

NameTypeRequiredDescription
bbox_min_lat number required South latitude of the bbox.
bbox_min_lon number required West longitude.
bbox_max_lat number required North latitude.
bbox_max_lon number required East longitude.
resolution integer optional H3 resolution.
Range 5 – 10. Default 8.
theme string optional Filter to a single theme schema.
limit integer optional Max cells returned.
Range 1 – 5,000. Default 1,000.

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": "density_grid",
      "arguments": {
            "bbox_min_lat": 45.45,
            "bbox_min_lon": 9.17,
            "bbox_max_lat": 45.49,
            "bbox_max_lon": 9.22,
            "resolution": 9,
            "theme": "commerce"
      }
    }
  }'

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, \"count\": 87 },\n  { \"h3_cell\": \"891fb466353ffff\", \"lat\": 45.4658, \"lon\": 9.1888, \"count\": 64 }\n]"
      }
    ]
  }
}

Prompts to try

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

  • Claude Desktop
    Heat-map commerce POIs across central Milan at H3 resolution 9.
  • Cursor
    Use density_grid res 8 over a 5×5 km bbox; pair with hex_neighbors for ring expansion.
  • Custom MCP client
    Compute commerce density for every neighborhood polygon's bbox.

Related tools

hex_neighbors · spatial_search · bbox_of

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: