レイヤーが参照するフィーチャクラスの座標系の距離単位を表示

      2017/12/09

Private Sub getLinearUnit()
    Dim pMxDocument As IMxDocument
    Set pMxDocument = ThisDocument
     
     
    Dim pGeoFeatureLayer As IGeoFeatureLayer
    Set pGeoFeatureLayer = pMxDocument.FocusMap.Layer(0)
     
    Dim pGeoDataset As IGeoDataset
    Set pGeoDataset = pGeoFeatureLayer.FeatureClass
     
    Dim pProjectedCoordinateSystem As IProjectedCoordinateSystem
    Set pProjectedCoordinateSystem = pGeoDataset.SpatialReference
     
    Dim pLinearUnit As ILinearUnit
    Set pLinearUnit = pProjectedCoordinateSystem.CoordinateUnit
     
    Debug.Print "距離単位:" & pLinearUnit.Name
 
End Sub

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