Skip to content

Instantly share code, notes, and snippets.

@todashuta
Created November 23, 2022 11:52
Show Gist options
  • Select an option

  • Save todashuta/7f307fbfb454c66d185de5175b72f4a3 to your computer and use it in GitHub Desktop.

Select an option

Save todashuta/7f307fbfb454c66d185de5175b72f4a3 to your computer and use it in GitHub Desktop.
度分秒の緯度経度を十進法度単位に変換
# degrees, minutes, seconds to decimal degrees
def dms2dd(d, m, s):
return d + (m / 60) + (s / 3600)
print([dms2dd(36, 6, 13.58925), dms2dd(140, 5, 16.27815)]) # [36.103774791666666, 140.08785504166667]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment