Public Function GetBackLatLon(FromPoint As IPoint) As IPoint '入力座標が地理座標系でない場合、Nothingを返す If FromPoint.SpatialReference Is Nothing Then Set GetBackLatLon = Nothing Exit Function ElseIf Not TypeOf FromPoint.SpatialReference Is IGeographicCoordinateSystem Then Set GetBackLatLon = Nothing Exit Function End If Dim pPoint As IPoint Set pPoint = New Point Set pPoint.SpatialReference = FromPoint.SpatialReference '経度の計算 If FromPoint.X > 0 Then pPoint.X = FromPoint.X - 180 Else pPoint.X = FromPoint.X + 180 End If '緯度の計算 If FromPoint.Y > 0 Then pPoint.Y = FromPoint.Y - Abs(FromPoint.Y) * 2 Else pPoint.Y = FromPoint.Y + Abs(FromPoint.Y) * 2 End If Set GetBackLatLon = pPoint End Function
地球の裏の緯度経度を求める
2016/9/1 (木)