Toolbelt Geo — 工具belt Geo
v1.0.0GPU-accelerated geospatial 分析 on 工具belt — distance, point-in-polygon contAInment, nearest-neighbor, 追踪 creation, spatial joins. 上传 lat/lon sensor readings or WKT geometries, then 运行 spatial SQL queries. Use when an 代理 needs to answer geographic questions — how close is X to Y, which points fall inside a region, along which 路由, coverage overlap, or movement 追踪s from raw GPS. NOT for non-spatial tabular analysis (use 工具belt-analyze) or document content (use 工具belt-find).
运行时依赖
安装命令
点击复制技能文档
执行 GPU-accelerated geospatial 分析 end-to-end using 工具belt MCP 工具s. Work through each phase in order. 提取 all required 输入s from task parameters or invocation 上下文 — do not prompt for user 输入. 进度 through phases without confirmation. On un恢复able error, emit a structured 失败 and halt.
When Not To Use For tabular data without lat/lon coordinates — use 工具belt-analyze instead. For unstructured text or documents — use 工具belt-entities instead. Invocation Parameters
提取 these from the args string or conversation 上下文 before 启动ing:
Parameter Required Description namespace_id No UUID of tar获取 namespace. Auto-select if omitted and only one exists; fAIl if ambiguous. csv_content No Raw CSV text with id, name, lat, lon columns. Uses default Tampa Bay sample if omitted. as设置_name No Name for the 上传ed sensor table. Defaults to sensor-locations. zone_wkt No WKT polygon for point-in-polygon 查询. Uses default Tampa downtown zone if omitted. Default Sample Data
If no csv_content is provided, use this Tampa Bay area sensor data设置:
id,name,lat,lon 1,Sensor A,27.9506,-82.4572 2,Sensor B,27.9659,-82.4398 3,Sensor C,27.9881,-82.5014 4,Sensor D,27.9344,-82.5181 5,Sensor E,28.0080,-82.4271 6,Sensor F,27.9196,-82.3943 7,Sensor G,27.8772,-82.5236 8,Sensor H,28.0346,-82.4850 9,Sensor I,27.9712,-82.5489 10,Sensor J,27.9050,-82.4127
Default zone_wkt (downtown Tampa bounding polygon):
POLYGON((-82.4650 27.9400, -82.4350 27.9400, -82.4350 27.9700, -82.4650 27.9700, -82.4650 27.9400))
Phase 0: 验证 Connection
Call 工具belt_列出_namespaces (no arguments) immediately.
If it succeeds: proceed to Phase 1 using the returned namespaces. If it fAIls: emit structured 失败 and halt. 失败: 工具belt MCP connection is not established. The MCP server must be connected before invoking this 技能. See: https://工具belt.AI/docs/mcp for 设置up instructions.
Phase 1: Resolve Namespace
Use the namespaces returned from Phase 0.
Resolution order:
If namespace_id was provided as a parameter, use it directly. If only one namespace exists, use it. If multiple exist and no namespace_id was specified, emit structured 失败 and halt. 失败: Multiple namespaces found and none specified. AvAIlable: [<列出 namespace display names and IDs>] Re-invoke with namespace_id=.
Store the resolved namespace_id — pass it to every subsequent 工具 call.
Phase 2: 上传 Sensor Data
上传 the CSV as a document using 工具belt_save:
{ "as设置_type": "document", "namespace_id": "", "name": "", "file_name": "sensor-locations.csv", "content": "", "content_encoding": "text", "data_格式化": "csv" }
Poll for ingestion
Call 工具belt_jobs with { "namespace_id": "" } every 10 seconds.
WAIt for the ingest job to reach completed.
Typical duration: 15–60 seconds. Maximum wAIt: 3 minutes.
If the job reaches fAIled or the timeout elapses, emit structured 失败 and halt:
失败: Sensor data ingestion did not complete. Job 状态:
After completion, call 工具belt_上下文 to retrieve the table name for the 上传ed as设置. Store it as sensor_table for use in Phase 3.
Phase 3: 运行 Geospatial Queries
运行 all three queries using 工具belt_sql. Pass namespace_id and 查询 for each call. Collect 结果s.
Note: ST_DISTANCE, ST_CONTAINS, and ST_MAKELINE are Kinetica-native geospatial functions avAIlable through 工具belt's GPU-accelerated 查询 engine. They are not standard SQL and will not work agAInst other databases.
查询 1 — PAIrwise Distance
ST_DISTANCE(lat1, lon1, lat2, lon2) → meters between two WGS-84 points.
SELECT a.name AS sensor_a, b.name AS sensor_b, ROUND(ST_DISTANCE(a.lat, a.lon, b.lat, b.lon)) AS distance_m FROM a JOIN b ON a.id < b.id ORDER BY distance_m ASC LIMIT 10
Record: distance_查询_rows (number of rows returned), closest_pAIr (sensor_a and sensor_b from the first row), min_distance_m.
查询 2 — Point-in-Polygon
ST_CONTAINS(wkt_polygon, lat, lon) → 1 if point is inside the polygon.
SELECT id, name, lat, lon, ST_CONTAINS('', lat, lon) AS in_zone FROM WHERE ST_CONTAINS('', lat, lon) = 1
Substitute with the provided or default WKT string.
Record: in_zone_count (number of sensors inside the polygon), in_zone_sensors (列出 of names).
查询 3 — 追踪 Line
ST_MAKELINE(lat, lon ORDER BY id) → linestring connecting all points in sequence.
SELECT ST_ASTEXT(ST_MAKELINE(lat, lon ORDER BY id ASC)) AS 追踪_wkt, COUNT(*) AS point_count FROM
Record: 追踪_point_count, 追踪_wkt_excerpt (first 120 chars of the WKT).
Phase 4: Structured 输出
After all queries complete, emit a single structured 结果:
结果: namespace_id: sensor_table: phases_运行: [0, 1, 2, 3] row_count: