GEODETIC DATUM: WGS84 · CLIENT-SIDE PRECISION · NO SIGN-UP
Open Map Lab
CARTOGRAPHIC METHODOLOGY · TECHNICAL SPECIFICATION

Geodetic & Mathematical Methodology

The verified formulas, geodetic reference frames, and algorithms powering Open Map Lab calculations.

1. Geodetic Datum & Reference Spheroid (WGS84)

All geographic coordinates and distance measurements in Open Map Lab are calculated using the World Geodetic System 1984 (WGS84 / EPSG:7030 / EPSG:4326). Because Earth is not a sphere but an oblate ellipsoid flattened at the poles, we use exact parameters:

  • Semi-major axis (equatorial radius, a) = 6,378,137.0 meters
  • Reciprocal of flattening (1/f) = 298.257223563
  • Semi-minor axis (polar radius, b) = 6,356,752.314245 meters
  • IUGG R₁ Mean Earth Radius = 6,371,008.7714 meters

2. Ellipsoidal Geodesics: Karney's Algorithm

Unlike legacy websites that use spherical Haversine formulas or Vincenty’s algorithm (which fails to converge between nearly antipodal points), Open Map Lab implements Charles F.F. Karney's exact ellipsoidal geodesic algorithm (Journal of Geodesy, 2013; GeographicLib).

Karney's method expresses the geodesic path as an elliptic integral mapped to an auxiliary sphere, solving both the direct (given point, azimuth, distance → destination) and inverse (given two points → distance and azimuths) problems with sub-millimeter precision everywhere on the globe, including antipodal points.

3. Spherical Haversine Formula (Model Comparison)

For educational comparison, our distance tools contrast the true WGS84 geodesic against the classic spherical Haversine formula (using IUGG mean radius R₁ = 6,371,008.8 m):

a = sin²(Δφ / 2) + cos(φ₁) · cos(φ₂) · sin²(Δλ / 2)
c = 2 · atan2(√a, √(1 − a))
d = R · c

Spherical models deviate from ellipsoidal ground truth by up to 0.5% (several miles on transcontinental routes) because they fail to account for the equatorial bulge. Open Map Lab displays this delta explicitly.

4. Ray-Casting Point-in-Polygon (Jordan Curve Theorem)

To determine whether a coordinate sits inside a county, state or country, we run a client-side ray-casting intersection test against boundary files served from this site; for ZIP codes and cities the polygon is fetched from Census TIGERweb and the same test and a nearest-edge distance are run in your browser:

A semi-infinite horizontal ray is cast from the coordinate point (x, y) eastward toward positive infinity. Each time the ray crosses a boundary segment of the polygon, an intersection counter increments. If the total number of crossings is odd, the point lies strictly inside the boundary; if even, it lies outside.

5. Copernicus GLO-90 DEM & Terrarium Elevation Decoding

Open Map Lab queries the European Space Agency’s Copernicus GLO-90 Digital Elevation Model, a global ~90-meter Digital Surface Model (DSM) referenced to the EGM2008 geoid (Mean Sea Level). When sampling elevation tiles, RGB channels are decoded as:

elevation_meters = (R × 256 + G + B / 256) − 32,768

The tiles encode heights to sub-meter steps, but the underlying terrain model is much coarser (roughly 30 m horizontal resolution), so real-world vertical error is typically several meters. Heights are referenced to mean sea level rather than raw smartphone ellipsoidal height.