PHPackages                             jtejido/geodesy-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. jtejido/geodesy-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jtejido/geodesy-php
===================

PHP library for geodesy functions

1.41(6y ago)2774.4k↑24.8%5[2 issues](https://github.com/jtejido/geodesy-php/issues)MITPHPPHP &gt;=7.0.0CI failing

Since Apr 13Pushed 6y ago2 watchersCompare

[ Source](https://github.com/jtejido/geodesy-php)[ Packagist](https://packagist.org/packages/jtejido/geodesy-php)[ RSS](/packages/jtejido-geodesy-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (12)Used By (0)

[![Earth](https://camo.githubusercontent.com/4ab70ca01086dea9730fc5bf5b281bc9291c10887bc742ad50899e51bc1f6970/68747470733a2f2f7777772e6d6b6f6d70662e636f6d2f6770732f696d616765732f737068657265322e706e67)](https://camo.githubusercontent.com/4ab70ca01086dea9730fc5bf5b281bc9291c10887bc742ad50899e51bc1f6970/68747470733a2f2f7777772e6d6b6f6d70662e636f6d2f6770732f696d616765732f737068657265322e706e67)

Geodesy-PHP
===========

[](#geodesy-php)

Geodesy-PHP is a port of some known geodesic/math functions for getting distance from a known point A to a known point B given their coordinates (good for working out distances between different latitude/longitude data provided by Google Geolocation or any RESTful APIs).

It also supports conversion between units of length, Polar position to Cartesian coordinates, and different Reference Datums.

It provides distance calculations by:

### [Great-circle distance](https://en.wikipedia.org/wiki/Great-circle_distance)

[](#great-circle-distance)

1. [Spherical Law of Cosines](https://en.wikipedia.org/wiki/Spherical_law_of_cosines)
2. [Haversine Formula](https://en.wikipedia.org/wiki/Haversine_formula)

### [Ellipsoid Geodesics](https://en.wikipedia.org/wiki/Geodesics_on_an_ellipsoid)

[](#ellipsoid-geodesics)

1. [Vincenty's Formula](https://en.wikipedia.org/wiki/Vincenty%27s_formulae)
2. [Hubeny's Formula](https://www.geo.tuwien.ac.at/fileadmin/editors/VGI/VGI_195403_Hubeny.pdf)
3. [Thomas' Formula](http://www.dtic.mil/dtic/tr/fulltext/u2/703541.pdf)
4. [Andoyer-Lambert Formula](https://navlib.net/wp-content/uploads/2013/10/admiralty-manual-of-navigation-vol-1-1964-english501c.pdf)
5. [Elliptic Distance](http://edukacja.3bird.pl/download/fizyka/astronomia-jean-meeus-astronomical-algorithms.pdf)
6. [Forsythe-Andoyer-Lambert Formula](http://www2.unb.ca/gge/Pubs/TR77.pdf)

Unit Conversion
---------------

[](#unit-conversion)

All operations are set in *Metre*. But it can also convert distance (and other transformation) values to:

1. Kilometre
2. Mile
3. Nautical Mile
4. Astronomical Unit

Position Conversion
-------------------

[](#position-conversion)

It also allows coordinate/geographical conversions between the ff:

1. Polar to Cartesian
2. Cartesian to Polar
3. Polar to Web Mercator
4. Web Mercator to Polar

Transformation Options
----------------------

[](#transformation-options)

Reference Datums are and will be, by default, set to WGS84. You can also transform one coordinate taken from a different source to another (see [this](https://epsg.io/) for reference), as it also comes with pre-built datums (see the Datum namespace for options).

The following are the transformation options:

1. 3-Parameter Molodensky Transformation
2. 7-Parameter Helmert Transformation
3. 10-Parameter Molodensky-Badekas Transformation

Documentation
=============

[](#documentation)

You can read about it [here](https://myth-of-sissyphus.blogspot.com/2018/04/geodesyphp-great-earth-distance-library.html)

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community10

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~59 days

Recently: every ~144 days

Total

11

Last Release

2365d ago

PHP version history (2 changes)1.0PHP &gt;=5.6

1.30PHP &gt;=7.0.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/2a026d9067502b30e8616ff1d6e1177f6fd70ec9c6cfcab57e33df1f2c162b9e?d=identicon)[jtejido](/maintainers/jtejido)

---

Top Contributors

[![jtejido](https://avatars.githubusercontent.com/u/13869015?v=4)](https://github.com/jtejido "jtejido (44 commits)")

---

Tags

andoyer-lambert-formuladistancedistance-calculationdistance-measureformulageodesic-functionsgeodesygeodesy-phpgeospatiallatitudelongitudemath-functionsreference-datumstransformationsvincenty-formulaweb-mercatorgeodesygreat-earth distance

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jtejido-geodesy-php/health.svg)

```
[![Health](https://phpackages.com/badges/jtejido-geodesy-php/health.svg)](https://phpackages.com/packages/jtejido-geodesy-php)
```

###  Alternatives

[nystudio107/craft-similar

Similar for Craft lets you find elements, Entries, Categories, Commerce Products, etc, that are similar, based on... other related elements.

2675.4k1](/packages/nystudio107-craft-similar)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
