我从以 Openlayers 格式放置的 web 服务坐标获取?
坐标看起来像(在荷兰):
X = 217382.52712700056
Y = 576653.00667405012
我想将它们转换为经度/纬度(十进制格式),例如 5.34343、51.34356
我认为它是球形墨卡托米的格式。我用这个公式来转换它。但结果毫无意义。
Dim mercX As Double = 217382.52712700056
Dim mercY As Double = 576653.00667405012
Dim rMajor As Integer = 6378137
Dim shift As Double = Math.PI * rMajor
Dim lon As Double = mercX / shift * 180.0
Dim lat As Double = mercY / shift * 180.0
lat = 180 / Math.PI * (2 * Math.Atan(Math.Exp(lat * Math.PI / 180.0)) - Math.PI / 2.0)
希望有人可以进一步帮助我....