预览加载中,请您耐心等待几秒...
1/9
2/9
3/9
4/9
5/9
6/9
7/9
8/9
9/9

在线预览结束,喜欢就下载吧,查找使用更方便

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

投影转经纬度 privateIPointPRJtoGCS(doublex,doubley){IPointpPoint=newPointClass();pPoint.PutCoords(x,y);ISpatialReferenceFactorypSRF=newSpatialReferenceEnvironmentClass();pPoint.SpatialReference=pSRF.CreateProjectedCoordinateSystem(2414);pPoint.Project(pSRF.CreateGeographicCoordinateSystem((int)esriSRGeoCSType.esriSRGeoCS_Beijing1954));returnpPoint;} 其中,pPoint.SpatialReference=pSRF.CreateProjectedCoordinateSystem(2414); 这行代码是设置pPoint的空间参考,也就是要转化的点的投影坐标。如果不知道投影坐标的话,转化会报异常。 2414为该投影的enum值 pPoint.Project(pSRF.CreateGeographicCoordinateSystem((int)esriSRGeoCSType.esriSRGeoCS_Beijing1954));将该点的投影坐标转化为经纬度。 经纬度到投影: HYPERLINK"http://www.cnblogs.com/yslfstar/archive/2010/03/15/1686163.html#viewSource"viewsource HYPERLINK"http://www.cnblogs.com/yslfstar/archive/2010/03/15/1686163.html#printSource"printHYPERLINK"http://www.cnblogs.com/yslfstar/archive/2010/03/15/1686163.html#about"? 1<DIVclass=cnblogs_code><PRE><DIV><!--<br/><br/>CodehighlightingproducedbyActiproCodeHighlighter(freeware)<br/>http://www.CodeHighlighter.com/<br/><br/>--><SPANstyle="COLOR:#0000ff">private</SPAN><SPANstyle="COLOR:#000000">IPointGCStoPRJ(IPointpPoint,</SPAN><SPANstyle="COLOR:#0000ff">int</SPAN><SPANstyle="COLOR:#000000">GCSType,</SPAN><SPANstyle="COLOR:#0000ff">int</SPAN><SPANstyle="COLOR:#000000">PRJType)<BR>{<BR>ISpatialReferenceFactorypSRF</SPAN><SPANstyle="COLOR:#000000">=</SPAN><SPANstyle="COLOR:#000000"></SPAN><SPANstyle="COLOR:#0000ff">new</SPAN><SPANstyle="COLOR:#000000">SpatialReferenceEnvironmentClass();<BR>pPoint.SpatialReference</SPAN><SPANstyle="COLOR:#000000">=</SPAN><SPANstyle="COLOR:#000000">pSRF.CreateGeographicCoordinateSystem(GCSType);<BR>pPoint.Project(pSRF.CreateProjectedCoordinateSystem(PRJType));<BR></SPAN><SPANstyle="COLOR:#0000ff">return</SPAN><SPANstyle="COLOR:#000000">pPoint;<BR>}</SPAN></DIV></PRE>2</DIV>3<P></P>4<P></P>5<P></P>6<P></P>7<P></P> 附:球面坐标esriSRGeoCS_WGS19844326WGS1984.esriSRGeoCS_Beijing19544214Beijing1954.平面坐标//北京54六度带esriSRProjCS_Beijing1954GK_1321413