← Back to Skills Marketplace
pointgh

坐标转换

by pointGH · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ Security Clean
302
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install gis-transform-coords
Description
支持GeoJSON格式点、线、面数据在WGS84(经纬度)和Web Mercator(EPSG:3857)坐标系间批量转换。
README (SKILL.md)

GIS 坐标转换 Skill

快速转换点、线、面数据的坐标系:WGS84(经纬度)↔ Web Mercator(EPSG:3857)

快速开始

转换 GeoJSON 到墨卡托

python3 ~/.openclaw/workspace/skills/gis-coord-transform/scripts/transform_coords.py input.geojson -t mercator -o output.geojson --pretty

转换墨卡托回经纬度

python3 ~/.openclaw/workspace/skills/gis-coord-transform/scripts/transform_coords.py input.geojson -t wgs84 -o output.geojson --pretty

支持的几何类型

类型 说明
Point
LineString 线
Polygon
MultiPoint 多点
MultiLineString 多线
MultiPolygon 多面
Feature GeoJSON 要素
FeatureCollection 要素集合

命令行参数

参数 说明
input 输入 GeoJSON 文件路径
-o, --output 输出文件路径(默认输出到 stdout)
-t, --to 目标坐标系:mercatorwgs84
--pretty 美化输出 JSON

使用示例

示例 1:转换单个点

// input.geojson
{
  "type": "Point",
  "coordinates": [116.4074, 39.9042]
}
python3 scripts/transform_coords.py input.geojson -t mercator

输出(墨卡托坐标):

{
  "type": "Point",
  "coordinates": [12958396.7, 4865942.3]
}

示例 2:转换 FeatureCollection

python3 scripts/transform_coords.py cities.geojson -t mercator -o cities_mercator.geojson --pretty

示例 3:批量转换

for file in *.geojson; do
  python3 scripts/transform_coords.py "$file" -t mercator -o "${file%.geojson}_mercator.geojson"
done

依赖安装

pip3 install pyproj

坐标系说明

坐标系 EPSG 代码 用途
WGS84 EPSG:4326 GPS、经纬度、地理坐标
Web Mercator EPSG:3857 Web 地图(Google Maps、OpenStreetMap、Mapbox 等)

常见问题

为什么转换后坐标数字变大了?

Web Mercator 使用米为单位,而 WGS84 使用度。墨卡托坐标通常在百万级别。

转换精度如何?

使用 pyproj 库,精度非常高,适合专业 GIS 应用。

支持其他坐标系吗?

当前版本仅支持 WGS84 ↔ Web Mercator。如需其他坐标系,可扩展 pyproj.Transformer

扩展建议

需要添加其他坐标系转换时,修改脚本中的 Transformer 定义:

# 例如:WGS84 → CGCS2000 (EPSG:4490)
transformer = Transformer.from_crs("EPSG:4326", "EPSG:4490", always_xy=True)

相关文件

  • scripts/transform_coords.py - 坐标转换主脚本
Usage Guidance
This appears to be a straightforward local GeoJSON coordinate converter. Before installing/running: (1) ensure you install pyproj from a trusted source (pip) in a controlled environment, (2) run the script on sample/test files first to confirm output, and (3) review/scan the included script if you require stricter assurance. There are no network calls or credential requests in the code, so risks are limited to running arbitrary local Python code from an untrusted source—treat the repository origin accordingly.
Capability Analysis
Type: OpenClaw Skill Name: gis-transform-coords Version: 1.0.1 The skill bundle is a legitimate GIS utility for converting GeoJSON coordinates between WGS84 and Web Mercator. The Python script (scripts/transform_coords.py) uses the standard 'pyproj' library for transformations and contains no suspicious execution patterns, network calls, or data exfiltration logic.
Capability Assessment
Purpose & Capability
Name/description match the included script and SKILL.md. The requested dependencies (pyproj) and CLI behavior are appropriate for GeoJSON coordinate transforms; there are no unrelated binaries, env vars, or surprising permissions.
Instruction Scope
SKILL.md only instructs running the included script and installing pyproj. The runtime instructions operate on local GeoJSON files and do not request unrelated files, environment variables, or network endpoints.
Install Mechanism
No install spec is provided (instruction-only). The README suggests installing pyproj via pip, which is standard; there are no downloads from unknown URLs or archive extraction steps.
Credentials
The skill declares no environment variables, credentials, or config paths. The code does not access secrets or external services—only local file I/O and pyproj transforms.
Persistence & Privilege
always is false and the skill does not modify agent/system configuration or other skills. It only reads an input file and writes an output file if requested.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install gis-transform-coords
  3. After installation, invoke the skill by name or use /gis-transform-coords
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
坐标转换
Metadata
Slug gis-transform-coords
Version 1.0.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is 坐标转换?

支持GeoJSON格式点、线、面数据在WGS84(经纬度)和Web Mercator(EPSG:3857)坐标系间批量转换。 It is an AI Agent Skill for Claude Code / OpenClaw, with 302 downloads so far.

How do I install 坐标转换?

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

Is 坐标转换 free?

Yes, 坐标转换 is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does 坐标转换 support?

坐标转换 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created 坐标转换?

It is built and maintained by pointGH (@pointgh); the current version is v1.0.1.

💬 Comments