{"id":48110046,"url":"https://github.com/zhyt1985/gcoord_skill","last_synced_at":"2026-04-04T16:02:52.638Z","repository":{"id":338987489,"uuid":"1159989132","full_name":"zhyt1985/gcoord_skill","owner":"zhyt1985","description":"A Claude Code skill for converting geographic coordinates between Chinese map coordinate systems (WGS84/GCJ02/BD09/BD09MC/WebMercator)","archived":false,"fork":false,"pushed_at":"2026-02-17T15:28:54.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-17T17:52:03.498Z","etag":null,"topics":["bd09","chinese-maps","claude-code","cli-tool","coordinate-system","gcj02","skill","skills","wgs84"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zhyt1985.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-17T12:10:18.000Z","updated_at":"2026-02-17T15:28:57.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zhyt1985/gcoord_skill","commit_stats":null,"previous_names":["zhyt1985/gcoord_skill"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/zhyt1985/gcoord_skill","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhyt1985%2Fgcoord_skill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhyt1985%2Fgcoord_skill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhyt1985%2Fgcoord_skill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhyt1985%2Fgcoord_skill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhyt1985","download_url":"https://codeload.github.com/zhyt1985/gcoord_skill/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhyt1985%2Fgcoord_skill/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31405227,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bd09","chinese-maps","claude-code","cli-tool","coordinate-system","gcj02","skill","skills","wgs84"],"created_at":"2026-04-04T16:02:52.478Z","updated_at":"2026-04-04T16:02:52.621Z","avatar_url":"https://github.com/zhyt1985.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gcoord Skill\n\n一个用于 Claude Code 的地理坐标系转换工具，专门处理中国地图坐标系互转问题。\n\n## 致谢\n\n本项目基于 [hujiulong/gcoord](https://github.com/hujiulong/gcoord) 开发，向原作者 **hujiulong** 致敬！感谢他提供了优秀的坐标转换核心算法库，让处理坐标系问题变得简单。\n\n## 开发工具\n\n本项目使用以下工具开发：\n\n- **Claude Code** - Anthropic 的 AI 命令行工具\n- **GLM 4.7** - 智谱 AI 提供的大语言模型\n\n---\n\n## 功能特性\n\n- 🔄 **多坐标系支持**：WGS84 / GCJ02 / BD09 / BD09MC / WebMercator\n- 📄 **文件操作**：支持读取 GeoJSON 文件并进行批量转换\n- 🚀 **大文件处理**：自动使用流式处理，支持超过 10MB 的大型文件\n- 📊 **进度显示**：实时显示转换进度，便于监控大批量数据处理\n- 💬 **自然语言**：支持中英文自然语言指令调用\n- 🌏 **坐标系别名**：支持 `高德`、`百度`、`GPS` 等中文别名\n\n## 支持的坐标系\n\n| 代码 | 中文名称 | 适用平台 | 别名 |\n|------|----------|----------|------|\n| WGS84 | 地球坐标系 | GPS 原始坐标 | `gps`, `地球坐标` |\n| GCJ02 | 火星坐标系 | 高德、腾讯地图 | `高德`, `amap`, `腾讯`, `火星坐标` |\n| BD09 | 百度坐标系 | 百度地图 | `百度`, `baidu`, `bmap` |\n| BD09MC | 百度米制坐标 | 百度地图米制 | `百度米制` |\n| WebMercator | 墨卡托投影 | Web 地图 | `墨卡托`, `epsg3857` |\n\n## 安装\n\n将此 skill 安装到 `~/.claude/skills/gcoord/` 目录：\n\n```bash\ngit clone https://github.com/zhyt1985/gcoord_skill.git ~/.claude/skills/gcoord_skill\ncd ~/.claude/skills/gcoord_skill/gcoord\nnpm install\n```\n\n---\n\n## 在 Claude Code 中使用\n\n安装 skill 后，在 Claude Code 中可以直接使用 `/gcoord` 命令或自然语言调用：\n\n### 方式一：使用 /gcoord 命令\n\n```\n/gcoord 116.403988,39.914266 --from wgs84 --to gcj02\n```\n\n### 方式二：自然语言调用\n\n```\n# 单点坐标转换\n帮我把 116.403988,39.914266 转成高德坐标\n\n# 文件转换\n把 @data.geojson 转成百度坐标系\n\n# 坐标系互转\nWGS84 转 GCJ02: [116.403988, 39.914266]\n\n# 转换并指定输出文件\n把 data.geojson 转成高德坐标，输出为 result.geojson\n```\n\n### 支持的自然语言模式\n\n| 模式 | 示例 |\n|------|------|\n| \"转成/转换为/转到\" | 转成高德坐标 |\n| \"在...地图显示\" | 在百度地图上显示 |\n| \"...坐标转...\" | GPS坐标转百度 |\n| \"帮我转换/帮我转\" | 帮我转换成火星坐标 |\n\n### 交互式坐标系选择\n\n当您未指定坐标系参数时，Claude Code 会智能提示您选择：\n\n#### 使用场景\n\n**场景 1: 未指定任何坐标系**\n```\n帮我转换 116.403988,39.914266\n\n# Claude 会提示选择坐标系\n```\n\n**场景 2: 从上下文推断**\n```\n把 116.403988,39.914266 在百度地图上显示\n# Claude 只会询问源坐标系（目标已明确为百度）\n```\n\n**场景 3: 明确指定参数**\n```\n/gcoord 116.403988,39.914266 --from WGS84 --to GCJ02\n# 不会提示，直接转换\n```\n\n---\n\n## 命令行使用\n\n### 基本用法\n\n```bash\n# 单点坐标转换\nnode index.js --input \"116.403988,39.914266\" --from WGS84 --to GCJ02\n\n# GeoJSON 字符串转换\nnode index.js --input '{\"type\":\"Point\",\"coordinates\":[116.403988,39.914266]}' --from WGS84 --to BD09\n\n# 文件转换\nnode index.js --file data.geojson --from WGS84 --to GCJ02 --output result.geojson\n\n# 原地转换（覆盖原文件）\nnode index.js --file data.geojson --from WGS84 --to GCJ02 --in-place\n\n# 大文件流式处理\nnode index.js --file large-data.geojson --from WGS84 --to GCJ02 --stream\n```\n\n### 命令行参数\n\n| 参数 | 简写 | 说明 |\n|------|------|------|\n| `--input \u003cstring\u003e` | `-i` | 输入坐标或 GeoJSON 字符串 |\n| `--file \u003cpath\u003e` | `-F` | 指定输入文件路径 |\n| `--output \u003cpath\u003e` | `-o` | 指定输出文件路径 |\n| `--from \u003ccrs\u003e` | `-f` | 源坐标系 |\n| `--to \u003ccrs\u003e` | `-t` | 目标坐标系 |\n| `--in-place` | `-I` | 原地转换，覆盖原文件 |\n| `--stream` | `-s` | 强制启用流式处理 |\n\n## 使用示例\n\n### 示例 1：转换单点坐标\n\n```bash\nnode index.js --input \"116.403988,39.914266\" --from WGS84 --to GCJ02\n```\n\n**输出：**\n```\n转换: WGS84 → GCJ02\n结果: 116.410232, 39.915670\n```\n\n### 示例 2：转换 GeoJSON 文件\n\n```bash\nnode index.js --file beijing-poi.geojson --from WGS84 --to GCJ02 --output beijing-poi-gcj02.geojson\n```\n\n**输出：**\n```\n文件: beijing-poi.geojson\n大小: 0.83 MB\n转换: WGS84 → GCJ02\n\n处理中...\n[██████████████████████████████] 100.0% (853/853) ETA: 0.0s\n✓ 已保存到: beijing-poi-gcj02.geojson\n```\n\n### 示例 3：使用中文别名\n\n```bash\n# 使用中文别名\nnode index.js --input \"116.403988,39.914266\" --from gps --to 高德\n\n# 转换到百度坐标系\nnode index.js --file data.geojson --from wgs84 --to 百度\n```\n\n### 示例 4：批量坐标转换\n\n```bash\nnode index.js --input \"116.403988,39.914266\n121.499763,31.239586\" --from WGS84 --to GCJ02\n```\n\n**输出：**\n```\n转换: WGS84 → GCJ02\n结果: 116.41023240747266, 39.915670251113426\n121.50419587831874, 31.237572062731754\n```\n\n## 支持的输入格式\n\n- **单点坐标**：`116.403988,39.914266`\n- **坐标数组**：`[116.403988, 39.914266]`\n- **批量坐标**：多行文本，每行一个坐标\n- **GeoJSON 字符串**：`{ \"type\": \"Point\", \"coordinates\": [...] }`\n- **GeoJSON 文件**：通过 `--file` 参数指定\n\n## 依赖\n\n- [gcoord](https://github.com/hujiulong/gcoord) v1.0.7 - 坐标转换核心库\n\n## 测试\n\n```bash\ncd gcoord \u0026\u0026 npm test\n```\n\n使用 Node.js 内置 `node:test` 运行，零外部依赖，覆盖单点转换、数组格式、批量转换、GeoJSON、无效坐标系报错、中英文别名、空输入及边界情况。\n\n## 注意事项\n\n1. **坐标系选择**：GPS 设备获取的原始坐标是 WGS84，在中国地图服务上显示需要先转换为 GCJ02（高德/腾讯）或 BD09（百度）\n2. **原地转换**：使用 `--in-place` 会直接覆盖原文件，请确保有备份\n3. **大文件处理**：文件大于 10MB 时自动启用流式处理以节省内存\n\n## 许可证\n\nMIT License - 详见 [LICENSE](LICENSE) 文件\n\n## 贡献\n\n欢迎提交 Issue 和 Pull Request！\n\n## 相关链接\n\n- [gcoord 库](https://github.com/hujiulong/gcoord) - 坐标转换核心算法\n- [Claude Code](https://claude.ai/code) - Claude AI 的命令行工具\n- [GLM 4.7](https://bigmodel.cn/glm-coding) - 智谱 AI 大语言模型\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhyt1985%2Fgcoord_skill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhyt1985%2Fgcoord_skill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhyt1985%2Fgcoord_skill/lists"}