← Back to Skills Marketplace
chenpipy

Coord Transform

by chenpipy · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
148
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install coord-transform
Description
坐标转换技能。当用户提到坐标转换、坐标系转换、EPSG转换、CGCS2000、WGS84、地理坐标转换、投影坐标转换、火星坐标系、百度坐标转换时激活。支持GeoJSON文件和WKT字符串的坐标系统转换,支持中国常用坐标系互转。
README (SKILL.md)

坐标转换技能 (coord-transform)

坐标系转换工具,支持 GeoJSON 和 WKT 格式,支持中国常用坐标系。

核心功能

  • 格式互转:WKT ↔ GeoJSON 互转
  • 坐标转换:支持各种坐标系之间的转换
  • 中国坐标系:完整支持 CGCS2000、WGS84、火星坐标系(GCJ-02)、百度坐标系(BD-09)

支持的坐标系

代码 名称 说明
4326 WGS84 GPS 标准,地理坐标
4490 CGCS2000 中国 2000 国家坐标系
4547-4556 CGCS2000 分带 3 度分带投影坐标系
3857 Web Mercator 互联网地图常用
4214 Beijing 1954 北京 54 坐标系
gcj02 火星坐标系 高德地图、腾讯地图使用
bd09 百度坐标系 百度地图专属

依赖

apt-get install python3-pyproj

使用方式

基本语法

python3 scripts/coord_convert.py --input \x3C文件或字符串> --from \x3C源坐标系> --to \x3C目标坐标系> [--format \x3C输出格式>] [--output \x3C输出文件>]

参数说明

参数 说明
--input / -i 输入文件路径或 GeoJSON/WKT 字符串
--wkt 直接指定 WKT 字符串(覆盖 --input)
--from / -f 源坐标系
--to / -t 目标坐标系
--format / -F 输出格式:geojson / wkt / auto(默认 auto)
--output / -o 输出文件路径
--list-crs 列出所有支持的坐标系

使用示例

1. 坐标系统转换

CGCS2000 (4490) → WGS84 (4326):

python3 scripts/coord_convert.py --wkt "POINT(113 23)" --from 4490 --to 4326

CGCS2000 (4490) → 投影坐标系 (4547):

python3 scripts/coord_convert.py --wkt "POLYGON((112.58 26.56,112.60 26.56,112.60 26.58,112.58 26.58,112.58 26.56))" --from 4490 --to 4547

2. WKT ↔ GeoJSON 格式互转

WKT 转 GeoJSON:

python3 scripts/coord_convert.py --wkt "POINT(113 23)" --from 4326 --to 4490 --format geojson

GeoJSON 转 WKT:

python3 scripts/coord_convert.py --input data.geojson --from 4490 --to 4326 --format wkt

3. 火星坐标系转换

WGS84 → 火星坐标系 (GCJ-02):

python3 scripts/coord_convert.py --wkt "POINT(113 23)" --from 4326 --to gcj02

火星坐标系 → WGS84:

python3 scripts/coord_convert.py --wkt "POINT(113 23)" --from gcj02 --to 4326

4. 百度坐标系转换

GCJ-02 → 百度坐标系 (BD-09):

python3 scripts/coord_convert.py --wkt "POINT(113 23)" --from gcj02 --to bd09

BD-09 → WGS84:

python3 scripts/coord_convert.py --wkt "POINT(113 23)" --from bd09 --to 4326

5. 完整流程示例

从百度坐标系的 GeoJSON 文件转换到 CGCS2000 投影坐标系:

python3 scripts/coord_convert.py --input baidu_data.geojson --from bd09 --to 4547 --output result.geojson

工作流程

  1. 解析输入(判断是 WKT 还是 GeoJSON)
  2. 解析源坐标系和目标坐标系
  3. 如果需要格式转换,先进行格式转换
  4. 使用合适的转换器(pyproj 或中国坐标转换算法)转换坐标
  5. 输出转换后的结果

输出格式

  • GeoJSON 输入 → 默认输出 GeoJSON
  • WKT 输入 → 默认输出 WKT
  • 可用 --format 参数强制指定输出格式

坐标系转换关系图

WGS84 (4326) ←→ GCJ-02 (火星坐标系) ←→ BD-09 (百度坐标系)
     ↑                ↑                    ↑
     └────────────────┼────────────────────┘
                     ↓
              CGCS2000 (4490)
                    ↓
           CGCS2000 分带 (4547-4556)

注意事项

  1. 火星坐标系和百度坐标系是中国特有的加密坐标系,无法直接用 pyproj 转换,使用内置算法
  2. WGS84 和 CGCS2000 在中国境内差异很小(通常 \x3C1米),实际使用中可互换
  3. 投影坐标系(如 4547)是平面坐标,单位为米,适用于工程测量
  4. 地理坐标系(如 4326)是经纬度,单位为度
Usage Guidance
This skill appears to do what it says: convert between CRS/WKT/GeoJSON and handle China-specific GCJ-02/BD-09 transforms. Before installing or running: 1) Inspect the complete scripts/coord_convert.py file in the package (the report shows a truncated snippet — ensure the file is intact and syntactically correct). 2) Install pyproj from your OS package manager or a trusted source; apt-get will require sufficient privileges. 3) Run the tool on non-sensitive or sample data first to confirm behavior. 4) Because the tool reads and writes files, be cautious when pointing it at directories you don't want modified. If you want higher assurance, run it in a sandboxed environment (container/VM) and review the full source for any unexpected file/network operations before use.
Capability Analysis
Type: OpenClaw Skill Name: coord-transform Version: 1.0.0 The coord-transform skill is a legitimate utility for converting geographic coordinates between various systems (WGS84, CGCS2000, GCJ-02, BD-09) and formats (GeoJSON, WKT). The Python script 'scripts/coord_convert.py' implements standard transformation algorithms and uses the 'pyproj' library without any hidden network calls, unauthorized file access, or obfuscated code. No malicious instructions or prompt-injection attempts were found in 'SKILL.md'.
Capability Assessment
Purpose & Capability
Name/description describe coordinate/CRS conversions and the package contains a Python script that uses pyproj plus custom GCJ-02/BD-09 algorithms — these match the stated purpose. The only external dependency mentioned (python3-pyproj) is appropriate for reprojection tasks.
Instruction Scope
SKILL.md instructs running the included script, supplying WKT/GeoJSON input files or strings, and writing output files — all expected for this tool. The provided script parses and transforms coordinates and reads/writes files accordingly. Note: the file contents shown in the report are truncated/partial (visible syntax truncation near the end), so verify the full script in the package before running; the truncated snippet could indicate an incomplete or corrupted file rather than malicious behavior.
Install Mechanism
No automatic install spec is included (instruction-only install), and the only required installation instruction is 'apt-get install python3-pyproj', which is a standard system package for reprojection. There are no remote downloads or obscure installers in the metadata.
Credentials
The skill does not request any environment variables, credentials, or config paths. This is proportionate: coordinate conversion does not require secrets or external service tokens.
Persistence & Privilege
The skill does not request always:true, does not declare persistence or privileged system modifications, and can be invoked by users only. It does not attempt to modify other skills or system-wide settings.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install coord-transform
  3. After installation, invoke the skill by name or use /coord-transform
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release of coord-transform. - Provides coordinate system conversion for GeoJSON and WKT formats, supporting major systems used in China (CGCS2000, WGS84, GCJ-02/火星, BD-09/百度, etc). - Supports mutual conversion between WKT and GeoJSON. - Includes command-line interface for specifying input data, source/target CRS, output format, and output file. - Supports projection and geographic systems (e.g., WGS84 4326, CGCS2000 4490/4547-4556, Beijing 1954, GCJ-02, BD-09). - Uses pyproj for standard transformations and built-in algorithms for encrypted Chinese coordinate systems. - Includes help commands and full usage examples for typical conversions.
Metadata
Slug coord-transform
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Coord Transform?

坐标转换技能。当用户提到坐标转换、坐标系转换、EPSG转换、CGCS2000、WGS84、地理坐标转换、投影坐标转换、火星坐标系、百度坐标转换时激活。支持GeoJSON文件和WKT字符串的坐标系统转换,支持中国常用坐标系互转。 It is an AI Agent Skill for Claude Code / OpenClaw, with 148 downloads so far.

How do I install Coord Transform?

Run "/install coord-transform" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Coord Transform free?

Yes, Coord Transform is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Coord Transform support?

Coord Transform is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Coord Transform?

It is built and maintained by chenpipy (@chenpipy); the current version is v1.0.0.

💬 Comments