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

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

import math

x_pi = 3.14159265358979324 * 3000.0 / 180.0

x = 113.812444

y = 22.775683

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) + 0.0065

lat = z * math.sin(theta) + 0.006

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

猜你喜欢

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