B
B
beginer1232016-08-18 18:17:45
C++ / C#
beginer123, 2016-08-18 18:17:45

Distance between 2 geographic coordinates?

Hello, how can I calculate the distance between 2 geographic coordinates?
you need to calculate and save in the database
With an error of a maximum of 1-10 meters

Answer the question

In order to leave comments, you need to log in

5 answer(s)
R
Rustem Sultanov, 2016-05-17
@neroforse

The boxed Int32 also implements the IComparable interface, but since the boxed Int32 was cast to an Object type, an explicit cast to the interface type is required.

S
Stanislav Silin, 2016-05-15
@byme

System.Int32 implements IComparable so there will be no exception.

I
Ilya Meshchikhin, 2016-05-15
@milya

When you write "number." in the last line, the system has no idea that obj contains an int value and just shows the methods for the IComparable interface.
But this does not mean that the code will work)

U
un1t, 2016-08-18
@beginer123

Formula:
https://en.wikipedia.org/wiki/Haversine_formula
Implementation:
https://pypi.python.org/pypi/haversine

G
GreatRash, 2016-08-18
@GreatRash

www.movable-type.co.uk/scripts/latlong.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question