转换屏幕坐标系到地图单位-arcgis开发和应用全教程

转换屏幕坐标系到地图单位使用IDisplayTransformation的ToMapPoint方法返回一个地图单位的点Dim pMxApp As IMxApplication Set pMxApp = Application Dim pPnt As IPoint Set pPnt = pMxApp.DisplayTransformation.ToMapPoint(x, y) MsgBox "Longitude = " & pPnt.x MsgBox "Latitude = " & pPnt.y DisplayTransformation The DisplayTransformation object, which can be accessed from the AppDisplay object, allows the conversion between display and map coordinates. The example above is typical for tool mouse event procedures that require map coordinates. After using QueryInterface to access the IMxApplication interface on the ArcMap Application object, code is chained together to first access the AppDisplay (IMxApplication :: Display), then the DisplayTransformation (IDisplay :: DisplayTransformation). The ToMapPoint method is called on the IDisplayTransformation interface, and the required x and y pixel coordinate arguments are passed in. A Point object is returned as a result of calling the method (IPoint).
ppt 文件大小:2.6MB