首页龙虾技能列表 › Coord Transform

Coord Transform

v1.0.0

坐标转换技能。当用户提到坐标转换、坐标系转换、EPSG转换、CGCS2000、WGS84、地理坐标转换、投影坐标转换、火星坐标系、百度坐标转换时激活。支持GeoJSON文件和WKT字符串的坐标系统转换,支持中国常用坐标系互转。

0· 109·0 当前·0 累计·💬 1
by @chenpipy·MIT-0
下载技能包
License
MIT-0
最后更新
2026/3/21
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
high confidence
The skill's files, instructions, and dependencies align with a coordinate-transformation tool and do not request unrelated credentials or suspicious installs.
评估建议
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...
详细分析 ▾
用途与能力
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.
指令范围
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.
安装机制
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.
凭证需求
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.
持久化与权限
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.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.02026/3/20

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.

● 无害

安装命令 点击复制

官方npx clawhub@latest install coord-transform
镜像加速npx clawhub@latest install coord-transform --registry https://cn.clawhub-mirror.com

技能文档

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

核心功能

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

支持的坐标系

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

依赖

apt-get install python3-pyproj

使用方式

基本语法

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

参数说明

参数说明
--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

工作流程

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

输出格式

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

坐标系转换关系图

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

注意事项

  • 火星坐标系和百度坐标系是中国特有的加密坐标系,无法直接用 pyproj 转换,使用内置算法
  • WGS84 和 CGCS2000 在中国境内差异很小(通常 <1米),实际使用中可互换
  • 投影坐标系(如 4547)是平面坐标,单位为米,适用于工程测量
  • 地理坐标系(如 4326)是经纬度,单位为度
数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务