sunzhong2003
路人甲
路人甲
  • 注册日期2005-07-06
  • 发帖数26
  • QQ
  • 铜币210枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1683回复:3

arcscene如何将坐标转换成屏幕坐标

楼主#
更多 发布于:2006-05-09 18:04
<P>arcscene如何将坐标转换成屏幕坐标</P>
<P>比如有(119.255 ,30.555)转换成 (1,32)</P>
喜欢0 评分0
jkbg2006
路人甲
路人甲
  • 注册日期2006-05-24
  • 发帖数4
  • QQ
  • 铜币115枚
  • 威望0点
  • 贡献值0点
  • 银元0个
1楼#
发布于:2006-05-24 20:49
<P>上面讲的是屏幕坐标转地理坐标</P>

<P>有没有地理转屏幕坐标的代码啊~!?</P>
<P>急</P>
举报 回复(0) 喜欢(0)     评分
gis
gis
管理员
管理员
  • 注册日期2003-07-16
  • 发帖数15951
  • QQ
  • 铜币25345枚
  • 威望15368点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
  • 帝国沙发管家
  • GIS帝国明星
  • GIS帝国铁杆
2楼#
发布于:2006-05-15 13:14
<H1>LocateMultiple Example</H1><CODE><PRE>'<BR>' Call this method to examine on the 3D Hits in the active viewer.<BR>' For example, from the ArcScene Tools | Customize | Commands | UIControls<BR>' dialog, create a new UIToolControl to allow for mouse clicks, and in the<BR>' UIToolControl's MouseDown event, pass the x and y screen coordinates<BR>' to this method:<BR>'<BR>'  Private Sub UIToolControl_MouseDown(ByVal button As Long, ByVal shift As Long, ByVal x As Long, ByVal y As Long)<BR>'<BR>'    ReportScreenPick x, y<BR>'<BR>'  End Sub<BR>'<BR>Public Sub ReportScreenPick(xScreen As Long, yScreen As Long)</PRE><PRE>  ' local variables:<BR>  Dim x As Long, y As Long<BR>  x = xScreen<BR>  y = yScreen<BR>  <BR>  ' reference ths scenegraph object in the scene:<BR>  Dim pSXDoc As ISxDocument<BR>  Set pSXDoc = ThisDocument<BR>  Dim pSG As ISceneGraph<BR>  Set pSG = pSXDoc.Scene.SceneGraph<BR>  <BR>  ' call the scenegraph's LocateMultiple method for the designated<BR>  ' location in the active viewer:<BR>  Dim pHits As IHit3DSet<BR>  pSG.LocateMultiple pSG.ActiveViewer, x, y, esriScenePickAll, True, pHits<BR>  <BR>  If pHits Is Nothing Then<BR>    MsgBox "No hits were returned."<BR>    Exit Sub<BR>  End If<BR>  <BR>  Dim i As Integer<BR>  Dim pHit As IHit3D<BR>  <BR>  MsgBox pHits.Hits.Count ; " hit(s) were returned - review the output in the VBA Immediate Window."<BR>  Debug.Print pHits.Hits.Count ; " Hit(s) at screen location " ; x ; ", " ; y ; ":"<BR>  <BR>  ' for each hit returned, report on its properties:<BR>  For i = 0 To pHits.Hits.Count - 1<BR>    Set pHit = pHits.Hits.Element(i)<BR>    Debug.Print "Hit " ; i + 1<BR>    With pHit<BR>      If TypeOf .Owner Is ILayer Then<BR>        Dim pLayer As ILayer<BR>        Set pLayer = .Owner<BR>        Debug.Print "  Owner(Layer): " ; pLayer.name<BR>      End If<BR>      <BR>      If Not .Object Is Nothing Then<BR>        If TypeOf .Object Is IFeature Then<BR>          Dim pFeature As IFeature<BR>          Set pFeature = .Object<BR>          Debug.Print "  Feature ID: " ; pFeature.OID<BR>        End If<BR>      End If<BR>      <BR>      Debug.Print "  Distance from the Observer to the Hit point: " ; .DistanceToObserver<BR>      Debug.Print "  Distance between the Hit point and the picking ray: " ; .DistanceToRay<BR>      Debug.Print "  Exact Hit: " ; .ExactHit<BR>      Debug.Print "  Geographic location: " ; .Point.x ; ", " ; .Point.y ; ", " ; .Point.Z<BR>      <BR>      Dim nDepthMin As Double, nDepthMax As Double<BR>      .GetDepthRange nDepthMin, nDepthMax<BR>      Debug.Print "  OpenGL Depth Range: " ; nDepthMin ; " - " ; nDepthMax<BR>      <BR>    End With<BR>    <BR>  Next</PRE><PRE>End Sub<BR></PRE></CODE>
GIS麦田守望者,期待与您交流。
举报 回复(0) 喜欢(0)     评分
xxhhoddity
路人甲
路人甲
  • 注册日期2003-08-24
  • 发帖数409
  • QQ
  • 铜币1295枚
  • 威望0点
  • 贡献值0点
  • 银元0个
3楼#
发布于:2006-05-15 09:29
<P>看AO</P>
GIS GSI IGS ISG SIG SGI
举报 回复(0) 喜欢(0)     评分
游客

返回顶部