1
zavior 2014-01-01 20:11:42 +08:00
其实。。这样转换违反国家相关法律
|
4
dancingbear 2014-01-02 00:09:40 +08:00
没有这样的逆向算法吧
|
6
phyng 2014-01-02 21:46:31 +08:00
import math
mercator = {"x":13514570.1, "y":3636377.2} lonlat = {} x = mercator['x']/ 20037508.3427892 * 180 y = mercator['y']/ 20037508.3427892 * 180 lonlat['x'] = x lonlat['y'] = 180 / math.pi * (2 * math.atan(math.exp(y * math.pi / 180)) - math.pi / 2) print lonlat 这样得到的结果是{'y': 31.027932178384102, 'x': 121.40344879134716} 有误差可能出在20037508.3427892以及math.pi 偏移问题不是指这个,偏移是实际坐标要经过我朝保密插件处理成假坐标,而墨卡托坐标跟经纬度坐标互转是有公开算法的对地球的不同表示。参考http://www.cnblogs.com/liongg/archive/2009/04/20/1439905.html http://bbs.esrichina-bj.cn/esri/viewthread.php?tid=78245 |
7
pc10201 OP @phyng "point":{"x":13514570.1,"y":3636377.2}请问这个坐标到底是国际的墨卡托坐标还是我朝加密后的火星坐标?
|
8
phyng 2014-01-03 13:43:44 +08:00
|