角度の相互変換
URL: https://www.wingfield.gr.jp/blog/2016/09/01/p7205/
2017/12/09
'角度の相互変換 'esriDirectionType ' esriDTNorthAzimuth :北方位角(北から時計回りの角度) ' esriDTSouthAzimuth :南方位角(南から時計回りの角度) ' esriDTPolar :極座標角(東から反時計回りの角度) ' esriDTQuadrantBearing :四分円方位角(指定した四方位から指定方位に向いた角度[eg,S 45 E]) Private Function GetAzimuthalToGeneral(ByVal Value As Variant, _ Optional ByVal InputType As esriDirectionType = esriDTNorthAzimuth, _ Optional ByVal OutputType As esriDirectionType = esriDTPolar, _ Optional ByVal Precision As Long = 0) As Variant Dim pAngularConverter As IAngularConverter Set pAngularConverter = New AngularConverter pAngularConverter.SetString Value, InputType, esriDUDecimalDegrees Select Case OutputType Case esriDTQuadrantBearing GetAzimuthalToGeneral = pAngularConverter.GetString(OutputType, esriDUDecimalDegrees, Precision) Case Else GetAzimuthalToGeneral = pAngularConverter.GetAngle(OutputType, esriDUDecimalDegrees) End Select End Function