pygeodesy
Pure Python geodesy tools
What it is and what it does
PyGeodesy is a comprehensive pure Python library for geodetic and geographic calculations. It implements multiple earth models—ellipsoidal (Exact, Karney, Vincenty, Nvector) and spherical (Trigonometry, Nvector)—each providing LatLon and Cartesian coordinate classes with methods to compute distances, bearings, intersections, and geometric properties. The library includes coordinate system converters (UTM, UPS, MGRS, OSGR, ECEF, Web Mercator, Cassini-Soldner), map projections (Albers, Lambert, azimuthal), path simplification algorithms (Ramer-Douglas-Peucker, Visvalingam-Whyatt, Reumann-Witkam), polygon clipping and boolean operations, height interpolation with Geoid models, and distance metrics (Fréchet, Hausdorff). Most functionality requires only Python; optional features depend on geographiclib, numpy, scipy, or external C++ utilities. Code is transcoded from JavaScript originals and C++ classes published under MIT.
Use it for:
- Calculate great-circle distance and bearing between geographic coordinates for navigation or route planning.
- Convert between coordinate systems (lat/lon to UTM, MGRS, ECEF) for GIS applications or mapping workflows.
- Find intersections of geodesic or rhumb lines, or nearest points on paths for spatial analysis.
- Simplify or clip geographic paths and polygons for efficient rendering or data reduction.
- Interpolate terrain height or geoid undulation at arbitrary lat/lon points for elevation models.
- Perform triangulation or trilateration from distance measurements to locate unknown points.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
PyGeodesy provides pure Python implementations of geodetic calculations for ellipsoidal and spherical earth models, including distance, bearing, coordinate conversions, and geometric operations on geographic points.
Yes. PyGeodesy is a mature, actively maintained library (Production/Stable, 331 GitHub stars, recent release) with zero known vulnerabilities, no runtime dependencies, and permissive MIT licensing. It is suitable for any project requiring geodetic calculations, coordinate conversions, or geographic geometry.
Install
pygeodesy on PyPI
pip
pip install pygeodesyuv
uv add pygeodesypoetry
poetry add pygeodesyInstalling pygeodesy
Before you install
Installation is straightforward with no runtime dependencies—the package is a pure Python wheel. Maintenance is active with a recent release and ongoing repository activity.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
Quickstart
pip install pygeodesy
from pygeodesy.ellipsoidalVincenty import LatLon
point1 = LatLon(50.0, 5.0)
point2 = LatLon(50.0, 3.0)
distance = point1.distanceTo(point2)
bearing = point1.bearingTo(point2)
Some modules require optional dependencies: geographiclib for Karney methods, numpy and scipy for certain Geoid and Height interpolators, and external C++ utilities for specialized features.
Verify before relying
- Whether all advertised coordinate systems (Cassini-Soldner, UPS, Web Mercator, MGRS, OSGR) are fully functional or partially implemented.
- Performance characteristics for large-scale geographic calculations or path operations on many points.
- Precision guarantees or error bounds for different earth models and calculation methods.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 16 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 453,932/month — #6,571 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pygeodesy-26.7.27-py2.py3-none-any.whl
Keywords: AER, AGM, Albers, altitude, Andoyer, annulus, antipode, apoapsis, apses, area, Arithmetic-Geometric-Mean, attitude, Authalic, auxiliary, azimuth, azimuthal, azimuth-elevation-range, bearing, bank, Barsky, Barth, beta, bi-quadratic, boolean, cached, Cagnoli, cartesian, Cassini, Cassini-Soldner, chord, circle-intersections, circumcenter, circumcircle, circumradius, clip, Cohen, Cohen-Sutherland, Collins, composite, conformal, conformal-sphere, conic, constants, contact-triangle, Cook, Correia, cosines-law, coverage, curvature, cylindrical, datum, deprecation, deficit, development, discrete, distance, Douglas, earth, east-north-up, eccentricity, ECEF, elevation, ellipse, ellipsoid, ellipsoidal-latitude-beta, ellipsoidal-longitude-omega, elliptic, ENU, EPSG, equal-area, equidistant, equirectangular, ETM, ETRF, Euclidean, even-odd-rule, ExactTM, excess, Farrell, Farrell-Barth, Ferrari-solution, Field-Of-View, flattening, fma, fmath, footpoint, footprint, Forster, Forster-Hormann-Popa, Forsythe, FOV, fractional, Frechet, Fréchet, frustum, Fsum, fused-multiply-add, GARS, Gauss-Kummer, geocentric, GeoConvert, GeodesicExact, geodesy, geodetic, GeodSolve, Geod3Solve, GeodTest, geographiclib, Geohash, geoid, geoidHeight, GeoidHeights, georef, Girard, gnomonic, gons, grades, gradians, Greiner, Greiner-Hormann, Hartzell, Hausdorff, Haversine, heading, hectare, height, Heikkinen, Heron, Hodgman, horizon, Hormann, Hubeny, IDW, incenter, incirle, infix_@_operator, inradius, intermediate, interpolate, intersect, intersection, intersection3d, intersections, IntersectTool, Inverse-Distance-Weighting, Isometric, ITRF, Jacobi, Jacobi-Conformal, Jarque-Bera, Jekel, Karney, Krueger, Krüger, kurtosis, Lambert, latitude, law-of-cosines, least-squares, Lesh, L_Huilier, LHuilier, Liang, Liang-Barsky, Linderholm-Segal, linearize, Line-Of-Sight, LocalCartesian, local-tangent-plane, local-x-y-z, longitude, LOS, loxodrome, lstsq, LTP, lune, mean, memoize, memoized, Mercator, Meeus, MGRS, nearest, NED, Niemeyer, non-finite, normalize, Norrdine, north-east-down, numpy, n-vector, Nvector, oblate, omega, orthographic, orthometric-height, OSGB, OSGR, overlap, parallel, parallel-of-latitude, Parametric, path-intersection, periapsis, perimeter, Peucker, Pierlot, pitch, plumb, Point-Of-View, polar, Popa, POV, precision-cubic-root, precision-hypotenuse, precision-powers, precision-running-summation, precision-square-root, precision-summation, prolate, Pseudo-Mercator, pygeodesy, PyInstaller, PyPy, quartic, radical, radii, radius, Ramanujan, Ramer, Ramer-Douglas-Peucker, Rectifying, Reduced, resect, resection, Rey-Jer, Reumann, Reumann-Witkam, rho-theta-phi, rhumb, RhumbSolve, running-linear-regression, running-statistics, running-stats, running-summation, scipy, secant, semi-latus-rectum, semi-perimeter, sexagecimal, similarity, simplify, skewness, Snellius, Snellius-Pothenot, Snyder, Soddy, Soddy-circles, Soldner, sphere, sphere-intersections, spherical-deficit, spherical-excess, spherical-polar, spherical-triangle, squared-quartic, standard-deviation, stereographic, Sudano, surface-area, Sutherland, Sutherland-Hodgman, tangent-circles, Terrestrial-Reference-Frame, Thomas, Tienstra, tilt, TMcoords, TMExact, toise, transverse, TransverseMercatorExact, TRF, triangle, triangulate, triaxial, triaxial-ellipsoid, trigonometry, trilaterate, trilaterate-2d, trilaterate-3d, TwoProduct, TwoSum, umbilic-point, unit, unroll, UPS, UTM, UTM/UPS, variance, velocities, Veness, Vermeille, viewing-frustum, Vincenty, Visvalingam, Visvalingam-Whyatt, volume, volumetric, Web-Mercator, Welford, WGRS, WGS, Whyatt, Wildberger, Witkam, winding-number, XYZ, yaw, You, zenzi-cubic, zenzi-quartic
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
pymap3dConverts between geographic and 3-D coordinate…
permissive · top 15,000 on PyPI
s2spheres2sphere provides Python bindings to work with…
permissive · top 15,000 on PyPI
pyGeoTileConverts between geographic coordinate systems…
permissive · top 15,000 on PyPI
mgrsConverts between MGRS (Military Grid Reference…
permissive · top 15,000 on PyPI
pygeohashEncodes latitude/longitude coordinates to…
permissive · top 5,000 on PyPI
geohash2Encodes latitude/longitude coordinates to…
agpl · top 5,000 on PyPI
py-geohex3Converts between geographic coordinates…
permissive · top 15,000 on PyPI
pyprojpyproj provides a Python interface to PROJ,…
permissive · top 1,000 on PyPI