Tools to compute geographical coordinates calculations. Geographic geometry is non-euclidean and uses method of three dimensional space in order to locate geographic coordinates.
Geographic Coordinates Calculation - dCode
Tag(s) : Geography
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
A geographic coordinate calculation is the name given to any operation using GPS coordinates (latitude and longitude) to determine another geographic location of an object, place or point.
Calculations are essential for various applications, including navigation and cartography.
dCode calculate the median (middle) point on a sphere with the same radius as Earth (it is not the same than on a plan).
Example: Take the coordinates P1 (45.678 N, 5.4321 E) and P2 (46.810 N, 5.1015 E), the median point is located (46.2441 N, 5.2685 E), whereas on a 2D plane it would have been slightly shifted (46.2440 N, 5.2668 E).
Knowing the starting point $ (\phi_1, \lambda_1) $ (latitude, longitude) the direction $ \theta $ (azimuth from the north) and the distance $ d $ on a sphere of radius $ R $, dCode can calculate the path (calculations in radians) and find the arrival coordinates $ (\phi_2, \lambda_2) $ by the formula:
$$ \phi_2 = \arcsin \left( \sin(\phi_1) \cos(\frac{d}{R}) + \cos(\phi_1) \sin(\frac{d}{R}) \cos(\theta) \right) \\ \lambda2 = \lambda1 + \operatorname{atan2} \left( \sin(\theta) \sin(\frac{d}{R}) \cos(\phi_1), \cos(\frac{d}{R}) − \sin(\phi_1) \sin(\phi_2) \right) $$
NB: this formula uses the atan2 function defined as $$ \operatorname{atan2}(y,x) = 2 \arctan{ \frac{ y }{ \sqrt{x^2+y^2} + x } } = 2 \arctan{ \frac{ \sqrt{x^2+y^2} - x }{ y } } $$
All angles are in radians. The distances $ d $ and $ R $ must have the same unit, the result will be in that same unit (usually meters or kilometers).
Use geocoding / geolocalisation function also available on dCode. It is not a calculation but of an association between an address and coordinates (latitude, longitude) on a map.
dCode retains ownership of the "Geographic Coordinates Calculation" source code. Any algorithm for the "Geographic Coordinates Calculation" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Geographic Coordinates Calculation" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Geographic Coordinates Calculation" or any other element are not public (except explicit open source licence like Creative Commons). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
The content of the page "Geographic Coordinates Calculation" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source.
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link:
In a scientific article or book, the recommended bibliographic citation is: Geographic Coordinates Calculation on dCode.fr [online website], retrieved on 2025-04-16,