I
I
iamdivine2021-02-11 18:23:10
.NET
iamdivine, 2021-02-11 18:23:10

How to calculate distance between two points on earth?

Good afternoon,
2 points for each coordinate lat, lon
How to calculate the distance between them?
I saw there is a .net Framework GeoCoordinate method, but I do it on .net core

Answer the question

In order to leave comments, you need to log in

3 answer(s)
G
Griboks, 2021-02-11
@iamdivine

There are several options, in order of increasing accuracy and "correctness":
1) The length of the segment multiplied by the dimension of 1 degree in meters, i.e. e.g. 30 km by 17 degrees → sqrt((1.76Δlat)^2+(1.76Δlon)^2)
2) As above, but different scales in lon and lat.
3) The length of the arc on the sphere.
4) The length of the arc on the ellipsoid.
5) The length of the arc on a certain ellipsoid, the most accurate for the terrain. The Carney distance (there is a link to ready-made libraries in different languages) on the WGS84 ellipsoid gives a good accuracy of 1-2 meters.
6) Calculation by geoid or local map. I can’t say anything here, because this is an overhead projector a little more than always.

D
Developer, 2021-02-11
@samodum

the length of an arc on a sphere.
Elementary school stereometry.
Already completely lazy

D
d-stream, 2021-02-11
@d-stream

On nuget.org dangles the same name with source codes inside - as many as two files.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question