- 33
- 0
- 约1.6万字
- 约 9页
- 2016-10-15 发布于四川
- 举报
ArcGIS ngine 下投影坐标和经纬度坐标的相互转换
投影转经纬度
private IPoint PRJtoGCS(double x, double y) { IPoint pPoint = new PointClass(); pPoint.PutCoords(x, y); ISpatialReferenceFactory pSRF = new SpatialReferenceEnvironmentClass(); pPoint.SpatialReference = pSRF.CreateProjectedCoordinateSystem(2414); pPoint.Project(pSRF.CreateGeographicCoordinateSystem((int)esriSRGeoCSType.esriSRGeoCS_Beijing1954)); return pPoint; }
其中,pPoint.SpatialReference = pSRF.CreateProjectedCoordinateSystem(2414);
这行代码是设置pPoint的空间参考,也就是要转化的点的投影坐标。如果不知道投影坐标的话,转化会报异常。
2414为该投影的enum值
pPoint.Project(pSRF.CreateGeographicCoordinateSystem((int)esriSRGeoCSType.esriSR
原创力文档

文档评论(0)