标签:投影 csharp mat math [] c# return 数组 pre
/// <summary> /// WGS84经纬度转Web墨卡托投影 /// </summary> /// <param name="dLong">经度</param> /// <param name="dLat">纬度</param> /// <returns>返回包含坐标值的数组</returns> public static double[] WGS84ToMercator(double dLong, double dLat) { double[] BLtoXY = new double[2]; double MercatorX = dLong * 20037508.34 / 180; double MercatorY = Math.Log(Math.Tan((90 + dLat) * Math.PI / 360)) / (Math.PI / 180); MercatorY = MercatorY * 20037508.34 / 180; BLtoXY[0] = MercatorX; BLtoXY[1] = MercatorY; return BLtoXY; } C#实现,实测还算精准,特此记录。
标签:投影 csharp mat math [] c# return 数组 pre
原文地址:http://www.cnblogs.com/lolitagis/p/7477829.html