How to format GPS latitude and longitude?

后端 未结 7 821
囚心锁ツ
囚心锁ツ 2021-01-04 07:48

In android(java) when you get the current latitude and longitude using the function getlatitude() etc you get the coordinates in decimal format:

latit

相关标签:
7条回答
  • 2021-01-04 08:30

    You have a coordinate in decimal degrees, this representation format is called "DEG"

    And you want a DEG to DMS (Degrees, Minutes, Seconds) (e.g 40°42′51″ N) ,
    conversion.

    This java code implementation at http://en.wikipedia.org/wiki/Geographic_coordinate_conversion

    if the DEG coordinate values is < 0, it is West for longitude or South for latitude.

    0 讨论(0)
提交回复
热议问题