I am working on an Java android project and have the following issue. I Searched so much but still I have the problem of converting the Latitude/Longitude values that are in DMS format (Eg: 38°2'56''N, 122°9'28''W) for their corresponding Decimal Degrees format.
我正在做一个Java android项目,有以下问题。我搜查了很多,但仍将纬度/经度值的问题,DMS格式(如:38°2”56 N,122°28”W)的格式对应的十进制度。
Example values that need to be converted for their corresponding decimal degrees format.
需要为其对应的十进制度格式转换的示例值。
38°49'59''N, 26°56'59''E
38°49 59”N,26°56 59”E
38°2'56''N, 122°9'28''W
38°2》56“N,122°28”W
34°52'58''S, 56°10'58''W
34°52 58”年代,56个10°58”W
Thank you
谢谢你!
3 个解决方案
#1
8
All you're doing when you convert DMS to decimal degrees is dividing by 60. Divide S by 60, add it to M, divide that result by 60, then add it to D.
当你把DMS转换成小数时,你所做的就是除以60。S除以60,加到M,除以60,再加到D。
The second part deals with the direction that the coordinates point. Picture a pair of axes with compass directions in their correct locations (i.e., up is N, right is E, down is S, left is W). This means that any decimal degree value corresponding to a DMS value that pointed either S or W is going to be negative.
第二部分讨论了坐标点的方向。在正确的位置上画出一对具有指南针方向的坐标轴。,向上是N,右边是E,向下是S,左边是W),这意味着任何对应于DMS值的小数度值,指向S或W都是负数。
38°2'56''N, 122°9'28''W -> 38.048889, -122.157778
38°2》56“N,122°28”W - > 38.048889,-122.157778
#2
3
D°M'S''
D°M的“
- Divide S by 60 and get X
- S除以60,得到X
- Find Y by adding X to M
- 通过把X和M相加得到Y
- Divide Y by 60 to get F
- Y除以60得到F
- Answer = D + F
- 答案= D + F
SUMMARY
总结
TO CONVERT FROM DMS TO DEGREE
从DMS转换为学位。
Degrees = D + ((S/60)+M)/60
度= D + (S/60)+M)/60。
Where D and M and S are the values that compose the DMS format : D°M'S''
D和M和S值组成DMS格式:D°M的“
#3
1
And you can always check your work with Sherif's formula here: http://transition.fcc.gov/mb/audio/bickel/DDDMMSS-decimal.html
您可以在这里使用Sherif的公式检查您的工作:http://transition.fcc.gov/mb/audio/bickel/DDDMMSS-decimal.html
#1
8
All you're doing when you convert DMS to decimal degrees is dividing by 60. Divide S by 60, add it to M, divide that result by 60, then add it to D.
当你把DMS转换成小数时,你所做的就是除以60。S除以60,加到M,除以60,再加到D。
The second part deals with the direction that the coordinates point. Picture a pair of axes with compass directions in their correct locations (i.e., up is N, right is E, down is S, left is W). This means that any decimal degree value corresponding to a DMS value that pointed either S or W is going to be negative.
第二部分讨论了坐标点的方向。在正确的位置上画出一对具有指南针方向的坐标轴。,向上是N,右边是E,向下是S,左边是W),这意味着任何对应于DMS值的小数度值,指向S或W都是负数。
38°2'56''N, 122°9'28''W -> 38.048889, -122.157778
38°2》56“N,122°28”W - > 38.048889,-122.157778
#2
3
D°M'S''
D°M的“
- Divide S by 60 and get X
- S除以60,得到X
- Find Y by adding X to M
- 通过把X和M相加得到Y
- Divide Y by 60 to get F
- Y除以60得到F
- Answer = D + F
- 答案= D + F
SUMMARY
总结
TO CONVERT FROM DMS TO DEGREE
从DMS转换为学位。
Degrees = D + ((S/60)+M)/60
度= D + (S/60)+M)/60。
Where D and M and S are the values that compose the DMS format : D°M'S''
D和M和S值组成DMS格式:D°M的“
#3
1
And you can always check your work with Sherif's formula here: http://transition.fcc.gov/mb/audio/bickel/DDDMMSS-decimal.html
您可以在这里使用Sherif的公式检查您的工作:http://transition.fcc.gov/mb/audio/bickel/DDDMMSS-decimal.html