http://rovertang.com/labs/tileindex/
关于中国的经纬度
国内的经纬度有三套系统:
WGS84: 为一种大地坐标系, 也是目前广泛使用的 GPS 全球卫星定位系统使用的坐标系.
GCJ02: 又称火星坐标系, 是由中国国家测绘局制订的地理信息系统的坐标系统. 由 WGS84 坐标系经加密后的坐标系.
BD09: 为百度坐标系, 在 GCJ02 坐标系基础上再次加密. 其中 bd09ll 表示百度经纬度坐标, bd09mc 表示百度墨卡托米制坐标.
使用 OpenStreetMap 的坐标为 WGS84; 使用高德地图, 腾讯地图的坐标为 GCJ02; 使用百度地图的坐标为 BD09; 谷歌地图和 Bing 地图的中国部分采用了高德地图的数据, 所以坐标为 GCJ02.
WGS84 的坐标转化为 GCJ02 的坐标是单向的, 即 WGS84 的坐标能够准确地变换为 GCJ02 坐标; 但 GCJ02 坐标转换为 WGS84 时会存在精度损失.
GCJ02 的坐标和 BD09 的坐标转换是双向的, 转换规则可以参考下面的 python 代码:
- import math
- x_pi = 3.14159265358979324 * 3000.0 / 180.0
- def amapcoor2bmapcoor(amap_lon, amap_lat):
- x = amap_lon
- y = amap_lat
- z = math.sqrt(x * x + y * y) + 0.00002 * math.sin(y * x_pi)
- theta = math.atan2(y, x) + 0.000003 * math.cos(x * x_pi)
- bmap_lon = z * math.cos(theta) + 0.0065
- bmap_lat = z * math.sin(theta) + 0.006
- return (bmap_lon, bmap_lat)
- def bmapcoor2amapcoor(bmap_lon, bmap_lat):
- x = bmap_lon - 0.0065
- y = bmap_lat - 0.006;
- z = math.sqrt(x * x + y * y) - 0.00002 * math.sin(y * x_pi);
- theta = math.atan2(y, x) - 0.000003 * math.cos(x * x_pi);
- amap_lon = z * math.cos(theta);
- amap_lat = z * math.sin(theta);
- return (amap_lon, amap_lat)
- https://github.com/geometalab/pyGeoTile
来源: http://www.bubuko.com/infodetail-3012572.html