指定した地点の TIN サーフェス高を取得

投稿日:2016/9/1 (木) 更新日:

Private Sub UIToolControl1_MouseDown(ByVal button As Long, ByVal shift As Long, ByVal x As Long, ByVal y As Long)
 
    Dim pMxApplication As IMxApplication
    Set pMxApplication = Application
     
    Dim pMxDocument As IMxDocument
    Set pMxDocument = ThisDocument
     
    Dim pTinLayer As ITinLayer
    Set pTinLayer = pMxDocument.FocusMap.Layer(0)
     
    'GetElevation
    Dim pTinSurface As ITinSurface
    Set pTinSurface = pTinLayer.Dataset
     
    Dim pPoint As IPoint
    Set pPoint = pMxApplication.Display.DisplayTransformation.ToMapPoint(x, y)
     
    Debug.Print pTinSurface.GetElevation(pPoint)
     
    'InterpolateZ
    Dim pTinSurface3 As ITinSurface3
    Set pTinSurface3 = pTinLayer.Dataset
    pTinSurface3.InterpolationMethod = esriLinearInterpolation
    Debug.Print pTinSurface3.InterpolateZ(pPoint.x, pPoint.y)
 
End Sub

関連記事

-プログラミング, ArcGIS
-, ,

Copyright© WINGFIELD since1981 , 2018 All Rights Reserved.