Spatial queryPro tier
points_in_polygon
Count and list POIs whose geometry falls inside a user-supplied polygon (WKT, EPSG:4326). Optional theme filter. Useful when the search area is irregular: an administrative boundary, a district shape, or an isochrone polygon.
Use cases
- Count every restaurant inside the Centro Storico polygon of Rome.
- Filter the catchment of an
isochrone_proxyresult to only public-transit POIs. - Aggregate by theme for a custom drawn polygon (e.g., a development zone).
- Run with
include_results=falsefor fast count-only queries on large polygons.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| polygon_wkt | string | required | POLYGON or MULTIPOLYGON in WKT, lon/lat (EPSG:4326). |
| theme | string | optional | Filter by theme schema. |
| include_results | boolean | optional | If false, only per-theme counts (faster). Default true. |
| limit | integer | optional | Max points returned. Range 1 – 1,000. Default 200. |
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": "points_in_polygon",
"arguments": {
"polygon_wkt": "POLYGON((12.45 41.89, 12.50 41.89, 12.50 41.92, 12.45 41.92, 12.45 41.89))",
"theme": "commerce",
"include_results": false
}
}
}'
Example response
JSON-RPC 2.0 result
json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "{\n \"counts_by_theme\": { \"commerce\": 1284 },\n \"total\": 1284\n}"
}
]
}
}
Prompts to try
Drop these into Claude Desktop, Cursor, or any MCP-aware client wired to https://mcp.qubitdata.it/mcp.
-
Claude Desktop
How many shops are inside this WKT polygon? Use points_in_polygon with include_results=false.
-
Cursor
Combine isochrone_proxy(15min walk) with points_in_polygon(theme=mobility) for a transit catchment.
-
Custom MCP client
List all healthcare POIs inside the admin boundary I'll pass as WKT.
Related tools
spatial_search · isochrone_proxy · density_grid
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: