alex_bn_lee

导航

【793】墨卡托坐标转WGS84

代码:

#WebMercator-wgs84
def webMercator2wgs84(x,y):
    lon = x/20037508.34*180
    lat = y/20037508.34*180
    lat= 180/math.pi*(2*math.atan(math.exp(lat*math.pi/180))-math.pi/2)
    return lon,lat 

“geometry”对应的为墨卡托坐标

“lonlat_geo”对应的为转化后的经纬度坐标

posted on 2022-12-17 19:51  McDelfino  阅读(491)  评论(0)    收藏  举报