Convert DD (decimal degrees) to DMS (degrees minutes seconds) in Python?

后端 未结 9 1971
花落未央
花落未央 2020-12-05 19:53

How do you convert Decimal Degrees to Degrees Minutes Seconds In Python? Is there a Formula already written?

9条回答
  •  醉话见心
    2020-12-05 20:10

    Use fmod and rounding to get the degrees and fraction separated. Multiply the fraction by 60 and repeat to get minutes and a remainder. Then multiply that last part by 60 again to get the number of seconds.

提交回复
热议问题