2014-10-11 31 views
-1

我知道如何使用緯度和經度來計算兩點之間的距離。但現在我有項目,它必須計算兩個點之間的距離,使用六角星像這個鏈接Calculate。,並與谷歌地圖得到sexagesimal,我得到這個Link,但我不知道如何做到這一點。任何人都知道如何做到這一點?如何在谷歌地圖上獲取六十進制數,並且計算兩個兩性之間的距離?

+0

_sexagesimal_?也許你的意思是_minute_? – hindmost 2014-10-11 11:18:01

+0

[Sexagesimal](http://astroxa.blogspot.com/2009/04/latitude-longitude-from-google-maps.html)。我想從谷歌地圖上的一個點上獲得sexagecimal,就像那個鏈接,第一個。然後我想要距離不是一分鐘計算這個sexagecimal像這樣的鏈接[Calculate](http://www.movable-type.co.uk/scripts/latlong.html)。 – AKCode 2014-10-11 11:24:06

回答

0

谷歌地圖中的點通常是十進制格式。你可以拿分十進制,並將其轉換使用如下方法中的鏈接http://www.sunearthtools.com/dp/tools/conversion.php#txtCnv_2給六十進制:

# You have decimal degrees (-73.9874°) instead of degrees, minutes, and seconds (-73° 59’ 14.64") 
# The whole units of degrees will remain the same (-73.9874° longitude, start with 73°) 
# Multiply the decimal by 60 (0.9874 * 60 = 59.244) 
# The whole number becomes the minutes (59’) 
# Take the remaining decimal and multiply by 60. (0.244 * 60 = 14.64) 
# The resulting number becomes the seconds (14.64"). Seconds can remain as a decimal. 
# Take your three sets of numbers and put them together, using the symbols for degrees (°), minutes (’), and seconds (") (-73° 59’ 14.64" longitude) 

我假設你知道如何從谷歌地圖的點。您已經知道如何使用緯度和經度來計算距離。以十進制或以十六進制計算距離將給出相同的答案。你只需要將它從一種形式轉換爲另一種形式。如果您有任何其他說明,請告知我。

+0

是的,其實是一樣的,但我的項目需要sexagesimal來獲得距離。 – AKCode 2014-10-11 13:21:44

+0

如果積分已經是六十進制數,那麼你可以將它們轉換爲十進制格式。我上面發佈的鏈接也將六十進制格式轉換爲十進制格式。我不確定你的具體要求是什麼。如果你能更詳細地闡述它,我相信其他人將能夠提供幫助。 – Joyson 2014-10-12 13:48:15

+0

我的項目需要sexagecimal,使用Floyd Warshall算法。我有手動計算我的項目。在你給我解決方案之前,我會混淆如何將經緯度轉換爲六十進制。但現在我明白了。 – AKCode 2014-10-12 15:18:41

相關問題