微算力 · API 导航与自营网关
API 接入 EN
未登录登录
🗂️

GeoJSON 极速验证与结构分析

geojson · v1.0.0
入口已确认,内容待校验 文件树里有 SKILL.md,但正文还没采回,frontmatter 未核对。
专业技能 安全 A 级 作者 jvy 公开目录收录
625 下载 0 安装 1.9k 收藏 12 浏览

简介

轻量级的 GeoJSON 结构检查与验证工具,快速识别坐标异常、计算边界框、统计几何类型,适合数据预览与排错。

原始描述

Inspect, validate, summarize, and troubleshoot GeoJSON files and payloads, including FeatureCollection checks, geometry counting, bbox generation, coordinate...

通过你的 Agent 添加

安装目录:geojson/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/geojson/
Codex CLI~/.codex/skills/geojson/
DeepSeek Harness~/.agents/skills/geojson/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

中文使用说明 来自收录源

核心用法

该Skill专注于GeoJSON文件的安全只读分析,提供三大核心功能:一是结构验证,检测JSON是否符合GeoJSON规范,识别FeatureCollection完整性、缺失geometry字段、坐标嵌套错误等常见问题;二是摘要统计,自动计算顶层类型、要素数量、几何类型分布及边界框(bbox);三是坐标安全审查,标记经纬度范围异常(超出±180/±90度)、坐标顺序混淆(lat/lon vs lon/lat)等潜在风险。支持文件路径和行内JSON两种输入模式,通过统一的geojson_tool.py脚本接口调用。

显著优点

安全零依赖:完全基于Python标准库实现,无第三方包引入,从根本上杜绝供应链攻击风险。完全离线运行:无任何网络请求、API调用或数据传输,适用于敏感数据处理场景。精准边界判定:内置决策规则明确区分本Skill与qgis、geocode、wgs84等相邻技能的职责边界,避免功能滥用。CRS安全意识:主动提示GeoJSON规范中CRS元数据缺失的现状,引导用户关注坐标参考系假设的合理性。

潜在缺点与局限性

只读限制明确:无法进行任何编辑、转换、重投影或裁剪操作,复杂GIS处理需移交qgis。无空间分析能力:不支持距离、面积计算等需投影变换的测量操作。依赖人工判断:坐标异常标记基于启发式规则(如数值范围),最终CRS确认仍需结合数据来源上下文。T3来源信任度:由个人开发者维护,虽经CLS认证无恶意代码,但长期维护持续性存在不确定性。

适合的目标群体

GIS数据工程师:快速批量验证GeoJSON数据质量,排查上游数据生产问题。前端地图开发者:调试Cesium/Leaflet等库加载失败的GeoJSON源文件。数据科学家:在导入空间数据前进行轻量级预处理检查。安全敏感场景用户:需在完全隔离网络环境下处理位置数据的政府、金融机构从业者。

常规使用风险

性能风险:超大GeoJSON文件(>100MB)的完整解析可能占用较多内存,建议分块处理或改用流式工具。误报风险:非WGS84坐标系的数据可能触发"坐标范围异常"警告,需结合source_credibility上下文解读。版本兼容:遵循RFC 7946标准,但旧版GeoJSON(2008版)的CRS成员处理可能产生歧义。技能边界误用:用户可能期望本Skill执行编辑操作,需严格遵循"When Not To Use"指引切换至qgis。

技能正文


name: geojson description: Inspect, validate, summarize, and troubleshoot GeoJSON files and payloads, including FeatureCollection checks, geometry counting, bbox generation, coordinate range review, and CRS-related safety guidance. Use when the user asks about GeoJSON, FeatureCollection, geometry validity, 坐标范围检查, bbox, GeoJSON summary, or GeoJSON debugging. metadata: openclaw: emoji: "🗂️" requires: bins: ["python3"] install: - id: "brew" kind: "brew" formula: "python" bins: ["python3"] label: "Install Python 3 (brew)"

GeoJSON

Use this skill for practical GeoJSON inspection and validation.

This skill focuses on safe read-only analysis of GeoJSON structure and coordinates. For deterministic GIS conversion, reprojection, clipping, or raster/vector processing on files, hand off to qgis.

What This Skill Does

  • Validate whether a JSON file or payload is plausible GeoJSON.
  • Summarize top-level type, feature count, geometry types, and bbox.
  • Flag obvious coordinate-range issues for longitude/latitude style data.
  • Explain common GeoJSON mistakes such as malformed FeatureCollection, missing geometry, or wrong coordinate nesting.
  • Recommend when EPSG:4326 assumptions are safe and when CRS clarification is required.

Standard Workflow

  1. Confirm whether the input is a file path or inline JSON.
  2. Parse the JSON and identify the top-level GeoJSON type.
  3. Count features and geometry types.
  4. Compute bbox from coordinates when possible.
  5. Flag likely coordinate problems:
    • out-of-range longitude/latitude
    • swapped lat,lon vs lon,lat
    • mixed geometry structures
  6. If the user needs file transformation, reprojection, or editing, switch to qgis.

Practical Commands

Summarize a GeoJSON file

python3 {baseDir}/scripts/geojson_tool.py summary --file ./data/sample.geojson

Validate a GeoJSON file

python3 {baseDir}/scripts/geojson_tool.py validate --file ./data/sample.geojson

Summarize inline GeoJSON

python3 {baseDir}/scripts/geojson_tool.py summary --json '{"type":"Point","coordinates":[116.4074,39.9042]}'

Decision Rules

  • Assume GeoJSON coordinates are lon,lat when they represent geographic positions unless the source clearly says otherwise.
  • Do not assume every GeoJSON file is WGS84 just because it is GeoJSON; verify source context if precision matters.
  • GeoJSON CRS metadata is effectively absent in modern practice; prefer explicit prose in the answer when CRS is uncertain.
  • If distance or area analysis is needed, recommend reprojection to a projected CRS before measurement.
  • Treat malformed but parseable data as suspect; report the issue instead of silently guessing.

What To Return

  • Top-level GeoJSON type.
  • Feature count when applicable.
  • Geometry type counts.
  • Bounding box when coordinates are present.
  • A short note about likely CRS/coordinate-order assumptions.
  • Specific validation errors or suspicious patterns when found.

When Not To Use

  • Reverse geocoding or coordinates-to-address lookup: use geocode.
  • WGS84-specific CRS reasoning: use wgs84.
  • Deterministic GIS processing, conversion, reprojection, or clipping: use qgis.
  • CesiumJS rendering logic: use cesium.

OpenClaw + ClawHub Notes

  • Keep examples generic and portable.
  • Do not hardcode private datasets, machine paths, or secrets.
  • For clawhub.ai publication, keep examples standards-based and version/changelog updates semver-driven.

Reference Docs In This Skill

  • Read {baseDir}/references/geojson-notes.md for common structures, nesting rules, and failure cases.

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

geojsondata-validationspatial-datajson-inspectiongis-pipelinecoordinate-check

同类 Skill