緯度と経度、および距離が与えられた場合、バウンディング ボックスを見つけたいと思います 。
def boundingBox(latitudeInDegrees, longitudeInDegrees, halfSideInKm):
lat = math.radians(latitudeInDegrees)
lon = math.radians(longitudeInDegrees)
halfSide = 1000*halfSideInKm
RADIUS_OF_EARTH = 6371
# Radius of the parallel at given latitude
pradius = radius*math.cos(lat)
latMin = lat - halfSide/radius
latMax = lat + halfSide/radius
lonMin = lon - halfSide/pradius
lonMax = lon + halfSide/pradius
rad2deg = math.degrees
return (rad2deg(latMin), rad2deg(lonMin), rad2deg(latMax), rad2deg(lonMax))
上記のコードで、radius の値と 6371 で表されるのは何RADIUS_OF_EARTH
ですか?
誰でも説明できますか?
ありがとう