我有像(23.7019973789308,72.5465551902882)这样的纬度和经度点,我有很多点,由用户在我的应用程序中输入,我只想将它们转换为 C# 中 43 区域的米。我没有得到任何合适的代码,谁可以转换这些点。我也通过这个链接,但没有得到解决方案。 http://www.igorexchange.com/node/927
我也试过这段代码......
static public IPoint FromLatLonToUTM(double lon, double lat, out double UTM_x, out double UTM_y)
{
ISpatialReferenceFactory2 pSpatRefFact;
IProjectedCoordinateSystem pToPCS;
IGeographicCoordinateSystem pFromGCS;
IGeometry pGeo ;
IPoint pPoint;
UTM_x = 0;
UTM_y = 0;
pPoint = new PointClass();
pPoint.PutCoords(lon, lat);
pSpatRefFact = new SpatialReferenceEnvironmentClass();
pFromGCS = pSpatRefFact.CreateGeographicCoordinateSystem((int)esriSRGeoCSType.esriSRGeoCS_NAD1983);
pToPCS = pSpatRefFact.CreateProjectedCoordinateSystem((int)esriSRProjCSType.esriSRProjCS_NAD1983UTM_17N);
pGeo = pPoint;
pGeo.SpatialReference = pFromGCS;
pGeo.Project (pToPCS);
pPoint = (IPoint) pGeo;
UTM_x = pPoint.X;
UTM_y = pPoint.Y;
Debug.Write(UTM_x);
Debug.WriteLine("");
Debug.Write(UTM_y);
Debug.WriteLine("");
return pPoint;
}
帮我.............