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.htmlhttp://bbs.esrichina-bj.cn/esri/viewthread.php?tid=78245