将ArcGIS UTM转换为WGS84
本文关键字:WGS84 转换 UTM ArcGIS | 更新日期: 2023-09-27 18:29:54
我需要将UTM坐标(EPSG:23030,Datum ED50,30N,Ellipse Hayford 1924)转换为WGS84(用于在谷歌上渲染)。我正在尝试使用ArcGIS库,但没有得到预期的结果。这是我的代码(C#):
SpatialReference wgs84 = SpatialReference.Create(4326);
MapPoint mp = ConvertCoordinate.FromUtm(string.Format("{0} {1} {2}", "30N", X, Y), wgs84, UtmConversionMode.None);
我想问题是我没有具体说明基准。
我解决了我的问题。C#代码:
public static void UTMToLatLongDSP(double X, double Y, out double latitude, out double longitude)
{
double[] xy = new double[] { X, Y };
MapPoint ptUTMED50 = new MapPoint(X, Y, new SpatialReference(23030));
SpatialReference srTrans = new SpatialReference(4326);
MapPoint ptWGS84 = (MapPoint)GeometryEngine.Project(ptUTMED50, srTrans);
latitude = ptWGS84.Y;
longitude = ptWGS84.X;
}