# Measure distance between two points

I want to code some converter in C# (I need it for a project), where I get two (or more) coordinate pairs from QGIS, in decimal degree pair format (47.xxxx,19.xxxx). I need to measure the distance between two pairs, and return the result in Meters (with decimal). I am new to GIS, and so far I only figured out that 0.00012 is roughly 10 meters. But I want my program to be more precise than this.

How can this be calculated?

Does it have any formula?

I need an accuracy of at least 1/10th of a meter (but cm accuracy would be really nice).

• Computing the distance between two lat/lon points on a spheroid is a partial differential equation only solvable through iterative means. It is the second of the two Problems of Geodesy, known as the Inverse (or Reverse) Problem. While it is possible to code your own, you'd save yourself a ton of debugging if you use a geodetic computation library. Dec 27, 2021 at 15:41
• 1 degree from East to West is rougly 110 km. At the Equator. At the Polar Circle that's only 36 km. So you figured wrong.
– Erik
Dec 27, 2021 at 16:19