GCJ经纬度(腾讯、高德)转WGS84经纬度EXCEL算法

时间:2024-03-29 15:02:57

将腾讯地图或高德地图采集的经纬度存至EXCEL.如下图所示

GCJ经纬度(腾讯、高德)转WGS84经纬度EXCEL算法


C2格计算公式:A2*2-(A2 + ((-100.0 + 2.0 * (B2- 105.0) + 3.0 * (A2- 35.0) + 0.2 * (A2 - 35.0)* (A2- 35.0) +0.1 * (B2- 105.0) * (A2- 35.0) + 0.2 * sqrt(abs(B2- 105.0))+(20.0 * sin(6.0 *(B2- 105.0)* 3.1415926535897932384626) + 20.0 *sin(2.0 *(B2- 105.0) *3.1415926535897932384626)) * 2.0 / 3.0+(20.0 * sin((A2- 35.0) *3.1415926535897932384626) + 40.0 *sin((A2- 35.0) / 3.0 *3.1415926535897932384626)) * 2.0 / 3.0+(160.0 *sin((A2- 35.0)/ 12.0 *3.1415926535897932384626) + 320 *sin((A2- 35.0) *3.1415926535897932384626 / 30.0)) * 2.0 / 3.0) * 180.0) / (( 6378245.0* (1 -0.00669342162296594323)) / ((1 - 0.00669342162296594323 * sin(A2/ 180.0 * 3.1415926535897932384626)*sin(A2/ 180.0 *3.1415926535897932384626)) * sqrt(1-0.00669342162296594323*sin(A2 / 180.0 *3.1415926535897932384626)*sin(A2/ 180.0 * 3.1415926535897932384626))) *3.1415926535897932384626))

D2格计算公式:B2*2-(B2+ ((300.0 +(B2- 105.0)+ 2.0 *(A2- 35.0) + 0.1 * (B2- 105.0) * (B2- 105.0) +0.1 * (B2- 105.0)*(A2- 35.0)+ 0.1 * sqrt(abs(B2- 105.0))+(20.0 * sin(6.0 *(B2- 105.0) * 3.1415926535897932384626) + 20.0 *sin(2.0 *(B2- 105.0)*3.1415926535897932384626)) * 2.0 / 3.0+(20.0 * sin((B2- 105.0) *3.1415926535897932384626) + 40.0 *sin((B2- 105.0) / 3.0 *3.1415926535897932384626)) * 2.0 / 3.0+(150.0 * sin((B2- 105.0) / 12.0 * 3.1415926535897932384626) + 300.0 *sin((B2- 105.0)/ 30.0 *3.1415926535897932384626)) * 2.0 / 3.0) * 180.0) / (6378245.0/ sqrt(1-0.00669342162296594323*sin(A2/ 180.0 *3.1415926535897932384626)*sin(A2/ 180.0 *3.1415926535897932384626))* cos(A2/ 180.0 *3.1415926535897932384626) *3.1415926535897932384626))

验证结果如下:左图是腾讯地图,右图是谷歌地球

GCJ经纬度(腾讯、高德)转WGS84经纬度EXCEL算法