python百度坐标转换成高德坐标

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/bquau/article/details/84978382

import math

lng = 1

lat = 1

x_pi = 3.14159265358979324 * 3000.0 / 180.0

x = lng - 0.0065

y = 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)

lng = z * math.cos(theta)

lat = z * math.sin(theta)

print(str(lat)+','+str(lng))

猜你喜欢

转载自blog.csdn.net/bquau/article/details/84978382
今日推荐