Class Map_Function
In: map_function.f90

地図座標系におけるいくらかの変換関数

Methods

Included Modules

Phys_Const Math_Const

Public Instance methods

Function :
dis2lat :real
y :real, intent(in)
: 基準緯度 phi0 からの空間距離 [m] (北向きが正)
phi0 :real, intent(in)
: 基準緯度 [rad]
 基準緯度 phi0 から空間距離 y [m] 離れた位置における緯度 [rad].
 y は北に計算する際は正値, 南に計算する際は負値を与えれば計算可能.

[Source]

real function dis2lat( y, phi0 )
!  基準緯度 phi0 から空間距離 y [m] 離れた位置における緯度 [rad].
!  y は北に計算する際は正値, 南に計算する際は負値を与えれば計算可能.
  use Phys_Const
  use Math_Const
  implicit none
  real, intent(in) :: y     ! 基準緯度 phi0 からの空間距離 [m] (北向きが正)
  real, intent(in) :: phi0  ! 基準緯度 [rad]

  dis2lat=y/radius+phi0

  return
end function
Function :
dis2lon :real
x :real, intent(in)
: 基準経度 lon0 からの空間距離 [m] (東向きが正)
lon0 :real, intent(in)
: 基準経度 [rad]
phi0 :real, intent(in)
: 基準緯度 [rad]
 基準経度 lon0 から空間距離 x [m] 離れた位置における経度 [rad].
 ただし, 基準緯度 phi0 [rad] から同緯度上で計測した距離を用いる.
 x は東に計算する際は正値, 西に計算する際は負値を与えれば計算可能.

[Source]

real function dis2lon( x, lon0, phi0 )
!  基準経度 lon0 から空間距離 x [m] 離れた位置における経度 [rad].
!  ただし, 基準緯度 phi0 [rad] から同緯度上で計測した距離を用いる.
!  x は東に計算する際は正値, 西に計算する際は負値を与えれば計算可能.
  use Phys_Const
  use Math_Const
  implicit none
  real, intent(in) :: x     ! 基準経度 lon0 からの空間距離 [m] (東向きが正)
  real, intent(in) :: lon0  ! 基準経度 [rad]
  real, intent(in) :: phi0  ! 基準緯度 [rad]

  dis2lon=x/(radius*cos(phi0))+lon0

  return
end function
Function :
dis2mlat :real
y :real, intent(in)
: 基準緯度 phi0 からの空間距離 [rad] (北向き正).
phi0 :real, intent(in)
: 基準緯度 [rad]
 基準緯度 phi0 から空間距離 y [m] 離れた位置における緯度 [rad].
 ただし, x は東方向に正, 西方向に負を与えれば計算可能.

[Source]

real function dis2mlat(y,phi0)
!  基準緯度 phi0 から空間距離 y [m] 離れた位置における緯度 [rad].
!  ただし, x は東方向に正, 西方向に負を与えれば計算可能.
  use Phys_Const
  use Math_Const
  implicit none
  real, intent(in) :: y     ! 基準緯度 phi0 からの空間距離 [rad] (北向き正).
  real, intent(in) :: phi0  ! 基準緯度 [rad]

  dis2mlat=asin(tanh(log(tan(0.25*pi+0.5*phi0))+y/radius))

  return
end function
Function :
dis2mlon :real
x :real, intent(in)
: 基準経度 lam0 からの空間距離 [m] (東向きが正)
lam0 :real, intent(in)
: 基準経度 [rad]
 基準経度 lam0 から地図距離 x [m] 離れた位置における経度 [rad].
 ただし, x は東方向に正, 西方向に負を与えれば計算可能.

[Source]

real function dis2mlon(x,lam0)
!  基準経度 lam0 から地図距離 x [m] 離れた位置における経度 [rad].
!  ただし, x は東方向に正, 西方向に負を与えれば計算可能.
  use Phys_Const
  implicit none
  real, intent(in) :: x     ! 基準経度 lam0 からの空間距離 [m] (東向きが正)
  real, intent(in) :: lam0  ! 基準経度 [rad]

  dis2mlon=x/radius+lam0

  return
end function
Function :
lonlat2lamdis :real
lon :real, intent(in)
: 求めたい点の経度 [rad].
phi :real, intent(in)
: 求めたい点の緯度 [rad].
lon0 :real, intent(in)
: 基準経度 [rad]
phi1 :real, intent(in)
: 基準緯度 1 [rad]
phi2 :real, intent(in)
: 基準緯度 2 [rad]
phi0 :real, intent(in), optional
: 地図座標基準緯度 0 [rad]. phi0 が設定されている場合, y 座標の距離を求める.
 基準緯度 phi1, phi2, 基準経度 lon0 から経度緯度 lon, phi [rad] 離れた
 位置までの地図上の距離 [m].

[Source]

real function lonlat2lamdis( lon, phi, lon0, phi1, phi2, phi0 )
!  基準緯度 phi1, phi2, 基準経度 lon0 から経度緯度 lon, phi [rad] 離れた
!  位置までの地図上の距離 [m].
  use Phys_Const
  use Math_Const
  implicit none
  real, intent(in) :: lon     ! 求めたい点の経度 [rad].
  real, intent(in) :: phi     ! 求めたい点の緯度 [rad].
  real, intent(in) :: lon0  ! 基準経度 [rad]
  real, intent(in) :: phi1  ! 基準緯度 1 [rad]
  real, intent(in) :: phi2  ! 基準緯度 2 [rad]
  real, intent(in), optional :: phi0  ! 地図座標基準緯度 0 [rad].
        ! phi0 が設定されている場合, y 座標の距離を求める.
  real :: n
  real :: rho, rho0

  n=log(cos(phi1)/cos(phi2))/log(tan(0.25*pi-0.5*phi1)/tan(0.25*pi-0.5*phi2))

  rho=(cos(phi1)*(tan(0.25*pi-0.5*phi))**n)/(n*(tan(0.25*pi-0.5*phi1))**n)

  if(present(phi0))then
     rho0=(cos(phi1)*(tan(0.25*pi-0.5*phi0))**n)/(n*(tan(0.25*pi-0.5*phi1))**n)
     lonlat2lamdis=rho0-rho*cos(n*(lon-lon0))
  else
     lonlat2lamdis=rho*sin(n*(lon-lon0))
  end if

  return
end function