AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Transbigdata Coordinates

skill-ni1o1-claude-skill-transbigdata-transbigdata-coordinates · by ni1o1

使用 TransBigData 进行坐标系转换和距离计算。适用于 WGS84、GCJ02、BD09 坐标系互转,以及两点间距离计算。

No reviews yet
0 installs
17 views
0.0% view→install

Install

$ agentstack add skill-ni1o1-claude-skill-transbigdata-transbigdata-coordinates

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-ni1o1-claude-skill-transbigdata-transbigdata-coordinates)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
7mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Transbigdata Coordinates? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

TransBigData 坐标转换指南

安装

pip install transbigdata

中国常用坐标系说明

| 坐标系 | 说明 | 常见来源 | |--------|------|----------| | WGS84 | GPS原始坐标,国际标准 | GPS设备、OpenStreetMap | | GCJ02 | 国测局坐标(火星坐标) | 高德地图、腾讯地图 | | BD09 | 百度坐标 | 百度地图 | | BD09MC | 百度墨卡托坐标 | 百度地图API |

坐标转换函数

WGS84 转换

import transbigdata as tbd

# WGS84 → GCJ02
data['Lng_gcj'], data['Lat_gcj'] = tbd.wgs84togcj02(data['Lng'], data['Lat'])

# WGS84 → BD09
data['Lng_bd'], data['Lat_bd'] = tbd.wgs84tobd09(data['Lng'], data['Lat'])

GCJ02 转换

# GCJ02 → WGS84
data['Lng_wgs'], data['Lat_wgs'] = tbd.gcj02towgs84(data['Lng'], data['Lat'])

# GCJ02 → BD09
data['Lng_bd'], data['Lat_bd'] = tbd.gcj02tobd09(data['Lng'], data['Lat'])

BD09 转换

# BD09 → WGS84
data['Lng_wgs'], data['Lat_wgs'] = tbd.bd09towgs84(data['Lng'], data['Lat'])

# BD09 → GCJ02
data['Lng_gcj'], data['Lat_gcj'] = tbd.bd09togcj02(data['Lng'], data['Lat'])

# BD09MC → BD09
data['Lng_bd'], data['Lat_bd'] = tbd.bd09mctobd09(data['x'], data['y'])

GeoDataFrame 坐标转换

transform_shape() - 批量转换几何对象

import geopandas as gpd

# 加载 GCJ02 坐标的数据
gdf = gpd.read_file('data_gcj02.shp')

# 转换为 WGS84
gdf_wgs84 = tbd.transform_shape(gdf, method=tbd.gcj02towgs84)

距离计算

getdistance() - 两点间距离

计算 WGS84 坐标系下两点间的球面距离。

# 单点距离
distance = tbd.getdistance(lon1, lat1, lon2, lat2)  # 返回米

# 向量化计算
data['distance'] = tbd.getdistance(
    data['slon'], data['slat'],
    data['elon'], data['elat']
)

完整示例

示例 1:高德数据转 WGS84

import pandas as pd
import transbigdata as tbd

# 加载高德地图采集的数据(GCJ02坐标)
data = pd.read_csv('amap_data.csv')

# 转换为 WGS84
data['Lng_wgs'], data['Lat_wgs'] = tbd.gcj02towgs84(data['Lng'], data['Lat'])

# 保存
data.to_csv('data_wgs84.csv', index=False)

示例 2:百度数据转 WGS84

import pandas as pd
import transbigdata as tbd

# 加载百度地图数据(BD09坐标)
data = pd.read_csv('baidu_data.csv')

# 转换为 WGS84
data['Lng_wgs'], data['Lat_wgs'] = tbd.bd09towgs84(data['Lng'], data['Lat'])

示例 3:计算 OD 距离

import pandas as pd
import transbigdata as tbd

# OD 数据
od_data = pd.DataFrame({
    'slon': [114.0, 114.1],
    'slat': [22.5, 22.6],
    'elon': [114.2, 114.3],
    'elat': [22.7, 22.8]
})

# 计算直线距离
od_data['distance_m'] = tbd.getdistance(
    od_data['slon'], od_data['slat'],
    od_data['elon'], od_data['elat']
)
od_data['distance_km'] = od_data['distance_m'] / 1000

print(od_data)

示例 4:转换 Shapefile

import geopandas as gpd
import transbigdata as tbd

# 加载 GCJ02 坐标的行政区划
districts = gpd.read_file('districts_gcj02.shp')

# 转换为 WGS84
districts_wgs84 = tbd.transform_shape(districts, method=tbd.gcj02towgs84)

# 保存
districts_wgs84.to_file('districts_wgs84.shp')

坐标系识别技巧

不确定数据坐标系时,可以:

  1. 将点叠加到不同底图上查看偏移
  2. 与已知坐标系的边界数据对比
  3. 查询数据来源的文档说明

常见偏移特征:

  • WGS84 在国内地图上会偏移 100-700 米
  • BD09 相对 GCJ02 还会有额外偏移

参考文档

完整文档: https://transbigdata.readthedocs.io/en/latest/CoordinatesConverter.html

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.