Measure the distance on google map using euclidean and haversine

Posted on

Distance represents the difference from the start position and end position. In this case the distance will be measured by simply knowing the coordinates of the earth called the coordinates of latitude and longitude. To take measurements here will compare the results of the Euclidean distance method and the method Haversine (for essentially the theory can be learned at the following link Haversine Euclidean Distance).

Earth coordinate values ​​are used here in the form of Decimal Deggre as follows
Point 1
Latitude: -7.275515
Longitute: 112.794895
Point 2
Latitude: -7.276207
Longitude: 112.790843Why use Decimal form Deggre? because ease in checking. Here checking the result use Google Earth.

Testing 1 
test first distance measurement using the Euclidean method. to the following equation
n: the distance
x1: latitude coordinates of point 1
x2: latitude coordinates of point 2
y1: longitude coordinates of point 1
y2: longitude coordinates of point 2
The results of these calculations multiply by 111 319 to get in units of Km. Values ​​obtained from the conversion of 1 111 319 degrees of the earth into kilometers.
so writing a program in excel euclidean measurements as follows


Where B6 = Latitude 1, B7 = 2 Latitude, Longitude 1 = C6, C7 = Longitude
results are obtained: 0.457595134 Km

Testing 2 
The next test is to look for the distance by using Haversine. The formula for the following methods Haversine

writing programs for distance measurement method in ms excel haversine as follows


6371.1 value is the value of the radius of the earth so that the results obtained in units of Km distance just as follows 0.453516442 KmResult Measuring in google earth

of both methods, which produce nearly as measured values ​​in google map is the method haversine. While the euclidean method used here to measure the distance between two points on a flat surface so that the result has a difference when compared with the method haversine.
For existing excel file both of these methods can in diwnload Here


Hopefully the above helps friends. And please also if there is an error correction in this paper.
Regards 🙂

Baca Juga :  Perbedaan antara Tread dan Core pada Processor
Gravatar Image

Leave a Reply