# 将WGS84坐标系转换为GCJ02火星坐标系
# 返回坐标字符串lon,lat
pi = 3.1415926535897932384626
a = 6378245.0
ee = 0.00669342162296594323
def wgs_gcj(lon, lat):
dLat = transform_lat(lon - 105.0, lat - 35.0)
dLon = transform_lon(lon - 105.0, lat - 35.0)
radLat = lat / 180.0 * pi
magic = math.sin(radLat)
magic = 1 - ee * magic * magic
sqrtMagic = math.sqrt(magic)
dLat = (dLat * 180.0) / ((a
python实现WGS84转GCJ02火星坐标
最新推荐文章于 2024-03-30 09:57:44 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)