我从以度数分钟格式存储在Excel工作表中的garmin设备收集的位置点--- W00208.172,N1046.977 如何将其转换为十进制度或度数分秒格式?
答案 0 :(得分:1)
经度范围(E或W)为-180到180,因此为3位数 纬度(N或S)的范围是-90到90,所以2位
选择" W00208.172",取前三位数并将其存储到degress:
deg = 002 然后将其余部分作为小数分钟:
min = 08.172
现在转换为十进制度数(DEG):
decDegrees = deg + min / 60.0
纬度相同:除了度数现在只有2位数 N1046.977:取10度,46.977分钟。
如果你想保留" W"符号:
在" W"的情况下,通常最好使用-1。或者" S",这是你转换的最后一步!
负十进制度表示W(经度)或S(经度)。
对于您提供的坐标,意思是:
纬度:北10046.977 = 10 + 46.977 / 60 = 10.78295;
lon:(2 + 8.172 / 60)* -1 = -2.1362;
所以位置应该在布基纳法索,距离Dununuai东南5,52公里的道路附近15米(=似乎合理)
答案 1 :(得分:1)
所以我一直在找一个懒惰的回答而且不高兴所以要把我最后做的那些放在这里:
想要在这两种格式之间进行转换:
33°59'05.5"S 22°39'42.7"E
和-33.98485,22.66186
左边是“Degrees Minutes Seconds”,右边是“Decimal”
当然,我必须做出一些假设,因为它假设您完全遵循上述格式。
好的,首先是从Degree到Decimal(源在单元格B2中):
=ROUNDDOWN(if(mid(B2,find(" ",B2)-1,1)="S","-","")&mid(B2,1,find("°",B2)-1)+mid(B2,find("°",B2)+1,find("'",B2)-find("°",B2)-1)/60+mid(B2,find("'",B2)+1,find("""",B2)-find("'",B2)-1)/60/60,5)&","&rounddown(if(right(B2,1)="W","-","")&mid(right(B2,find(" ",B2)-1),1,find("°",right(B2,find(" ",B2)-1))-1)+mid(right(B2,find(" ",B2)-1),find("°",right(B2,find(" ",B2)-1))+1,find("'",right(B2,find(" ",B2)-1))-find("°",right(B2,find(" ",B2)-1))-1)/60+mid(right(B2,find(" ",B2)-1),find("'",right(B2,find(" ",B2)-1))+1,find("""",right(B2,find(" ",B2)-1))-find("'",right(B2,find(" ",B2)-1))-1)/60/60,5)
然后从Decimal到Degree(源在单元格C2中):
=abs(ROUNDDOWN(left(C2,find(",",C2)-1))) & "°" & ROUNDDOWN((abs(left(C2,find(",",C2)-1))-abs(ROUNDDOWN(left(C2,find(",",C2)-1))))*60) & "'" & round(((abs(left(C2,find(",",C2)-1))-abs(ROUNDDOWN(left(C2,find(",",C2)-1))))*60- rounddown((abs(left(C2,find(",",C2)-1))-abs(ROUNDDOWN(left(C2,find(",",C2)-1))))*60))*60,1) & """"&if(value(left(C2,find(",",C2)-1))<0,"S","N")& " " & abs(ROUNDDOWN(RIGHT(C2,len(C2)-find(",",C2)))) & "°" & rounddown((abs(RIGHT(C2,len(C2)-find(",",C2)))-abs(ROUNDDOWN(RIGHT(C2,len(C2)-find(",",C2)))))*60) & "'" & round(((abs(RIGHT(C2,len(C2)-find(",",C2)))-abs(ROUNDDOWN(RIGHT(C2,len(C2)-find(",",C2)))))*60- rounddown((abs(RIGHT(C2,len(C2)-find(",",C2)))-abs(ROUNDDOWN(RIGHT(C2,len(C2)-find(",",C2)))))*60))*60,1) & """"&if(value(right(C2,len(C2)-find(",",C2)))<0,"W","E")
如果只有你可以在公式中有变量...大部分都是重复的公式,并且有一些简单的规则...无论如何,希望它可以帮助某人。
答案 2 :(得分:0)
此公式适用于Google表格,可将格式从018°40.1333转换为18.66888833和-34°01.0597转换为-34.01766167
=IF(MID(B2,1,1) = "-", (INT(MID(B2, 1, SEARCH("°", B2) - 1)) - MID(B2, SEARCH("°", B2) + 1, len(B2))/60), (INT(MID(B2, 1, SEARCH("°", B2) - 1)) + MID(B2, SEARCH("°", B2) + 1, len(B2))/60))