QGIS
Use this skill for deterministic, file-based GIS processing through qgis_process.
Core Rules
- - Confirm source files, destination files, and target CRS before running commands.
- Prefer writing to a new output path; do not overwrite source data unless user explicitly asks.
- Discover algorithm parameters from
qgis_process help <algorithm-id> before execution. - If output format is not specified, default to
GPKG for vector and GeoTIFF for raster. - For batch operations, run one representative file first, then scale to the full set.
Standard Workflow
- 1. Validate tool and inspect capabilities:
CODEBLOCK0
- 2. Find and inspect a specific algorithm:
CODEBLOCK1
- 3. Execute with explicit parameters:
CODEBLOCK2
- 4. Verify output exists and report summary (path, layer count/bands, CRS, extent).
Common Patterns
CODEBLOCK3
Safety Boundaries
- - Do not guess units; confirm whether distance/area is in degrees or projected units.
- If CRS is missing/invalid, stop and ask for the intended CRS before processing.
- Avoid lossy conversion unless requested (for example dropping attributes or precision).
- For long batch runs, provide dry-run plan first: algorithm, inputs, outputs, and overwrite policy.
OpenClaw + ClawHub Notes
- - Keep commands shell-safe and reproducible in OpenClaw terminal sessions.
- Keep this skill portable: no hardcoded machine paths, credentials, or private endpoints.
- For clawhub.ai publication, keep versioning/changelog semver-driven and update examples only with generic sample data.
QGIS
使用此技能通过 qgis_process 进行确定性、基于文件的GIS处理。
核心规则
- - 在运行命令前确认源文件、目标文件和目标坐标系。
- 优先写入新的输出路径;除非用户明确要求,否则不要覆盖源数据。
- 在执行前通过 qgis_process help <算法ID> 发现算法参数。
- 若未指定输出格式,矢量数据默认使用 GPKG,栅格数据默认使用 GeoTIFF。
- 对于批量操作,先运行一个代表性文件,再扩展到完整数据集。
标准工作流程
- 1. 验证工具并检查功能:
bash
qgis_process --version
qgis_process list
- 2. 查找并检查特定算法:
bash
qgis_process list | rg -i clip|buffer|reproject|merge|warp|dissolve
qgis_process help native:clip
- 3. 使用显式参数执行:
bash
qgis_process run <算法ID> -- \
INPUT=<输入路径> \
OUTPUT=<输出路径>
- 4. 验证输出是否存在并报告摘要(路径、图层数量/波段数、坐标系、范围)。
常见模式
bash
重投影矢量图层
qgis_process run native:reprojectlayer -- \
INPUT=./data/input.gpkg \
TARGET_CRS=EPSG:4326 \
OUTPUT=./out/reprojected.gpkg
按覆盖图层裁剪矢量图层
qgis_process run native:clip -- \
INPUT=./data/roads.gpkg \
OVERLAY=./data/boundary.gpkg \
OUTPUT=./out/roads_clipped.gpkg
矢量要素缓冲区
qgis_process run native:buffer -- \
INPUT=./data/points.gpkg \
DISTANCE=100 \
SEGMENTS=8 \
DISSOLVE=false \
OUTPUT=./out/points
buffer100m.gpkg
安全边界
- - 不要猜测单位;确认距离/面积是以度为单位还是投影单位。
- 如果坐标系缺失/无效,停止处理并询问预期的坐标系。
- 除非被要求(例如丢弃属性或精度),否则避免有损转换。
- 对于长时间批量运行,先提供预运行计划:算法、输入、输出和覆盖策略。
OpenClaw + ClawHub 说明
- - 保持命令在OpenClaw终端会话中安全且可重现。
- 保持此技能可移植:无硬编码的机器路径、凭据或私有端点。
- 对于clawhub.ai发布,保持版本控制/变更日志遵循语义化版本,仅使用通用样本数据更新示例。