{"id":13828561,"url":"https://github.com/jtejido/geodesy-php","last_synced_at":"2026-03-27T04:05:17.705Z","repository":{"id":57002513,"uuid":"129422181","full_name":"jtejido/geodesy-php","owner":"jtejido","description":"Geodesy PHP - Port of some known geodesic/math functions for getting distance from a known point A to a known point B given their coordinates. It also supports conversion between units of length, Polar position to Cartesian coordinates, and different Reference Datums.","archived":false,"fork":false,"pushed_at":"2019-11-26T13:58:55.000Z","size":204,"stargazers_count":28,"open_issues_count":2,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-12-14T22:54:18.463Z","etag":null,"topics":["andoyer-lambert-formula","distance","distance-calculation","distance-measure","formula","geodesic-functions","geodesy","geodesy-php","geospatial","latitude","longitude","math-functions","reference-datums","transformations","vincenty-formula","web-mercator"],"latest_commit_sha":null,"homepage":"http://myth-of-sissyphus.blogspot.com/2018/04/geodesyphp-great-earth-distance-library.html","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jtejido.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-13T15:39:25.000Z","updated_at":"2024-12-18T18:38:27.000Z","dependencies_parsed_at":"2022-08-21T14:10:27.558Z","dependency_job_id":null,"html_url":"https://github.com/jtejido/geodesy-php","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/jtejido/geodesy-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtejido%2Fgeodesy-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtejido%2Fgeodesy-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtejido%2Fgeodesy-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtejido%2Fgeodesy-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jtejido","download_url":"https://codeload.github.com/jtejido/geodesy-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtejido%2Fgeodesy-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31018546,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-27T03:51:26.850Z","status":"ssl_error","status_checked_at":"2026-03-27T03:51:09.693Z","response_time":164,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["andoyer-lambert-formula","distance","distance-calculation","distance-measure","formula","geodesic-functions","geodesy","geodesy-php","geospatial","latitude","longitude","math-functions","reference-datums","transformations","vincenty-formula","web-mercator"],"created_at":"2024-08-04T09:02:52.243Z","updated_at":"2026-03-27T04:05:17.675Z","avatar_url":"https://github.com/jtejido.png","language":"PHP","readme":"\n![Earth](https://www.mkompf.com/gps/images/sphere2.png)\n\n\nGeodesy-PHP\n=============\n\nGeodesy-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).\n\nIt also supports conversion between units of length, Polar position to Cartesian coordinates, and different Reference Datums.\n\nIt provides distance calculations by:\n\n\n### [Great-circle distance](https://en.wikipedia.org/wiki/Great-circle_distance) ###\n\n1. [Spherical Law of Cosines](https://en.wikipedia.org/wiki/Spherical_law_of_cosines) \n\n2. [Haversine Formula](https://en.wikipedia.org/wiki/Haversine_formula)\n\n\n### [Ellipsoid Geodesics](https://en.wikipedia.org/wiki/Geodesics_on_an_ellipsoid) ###\n\n1. [Vincenty's Formula](https://en.wikipedia.org/wiki/Vincenty%27s_formulae)\n\n2. [Hubeny's Formula](https://www.geo.tuwien.ac.at/fileadmin/editors/VGI/VGI_195403_Hubeny.pdf)\n\n3. [Thomas' Formula](http://www.dtic.mil/dtic/tr/fulltext/u2/703541.pdf)\n\n4. [Andoyer-Lambert Formula](https://navlib.net/wp-content/uploads/2013/10/admiralty-manual-of-navigation-vol-1-1964-english501c.pdf)\n\n5. [Elliptic Distance](http://edukacja.3bird.pl/download/fizyka/astronomia-jean-meeus-astronomical-algorithms.pdf)\n\n6. [Forsythe-Andoyer-Lambert Formula](http://www2.unb.ca/gge/Pubs/TR77.pdf)\n\n\n\n## Unit Conversion ##\n\n\nAll operations are set in *Metre*. But it can also convert distance (and other transformation) values to:\n\n\n1. Kilometre\n\n2. Mile\n\n3. Nautical Mile\n\n4. Astronomical Unit\n\n\n\n## Position Conversion ##\n\n\nIt also allows coordinate/geographical conversions between the ff:\n\n\n1. Polar to Cartesian\n\n2. Cartesian to Polar\n\n3. Polar to Web Mercator\n\n4. Web Mercator to Polar\n\n\n\n## Transformation Options ##\n\n\nReference 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). \n\nThe following are the transformation options:\n\n\n1. 3-Parameter Molodensky Transformation\n\n2. 7-Parameter Helmert Transformation\n\n3. 10-Parameter Molodensky-Badekas Transformation\n\n\n\nDocumentation\n=============\n\nYou can read about it [here](https://myth-of-sissyphus.blogspot.com/2018/04/geodesyphp-great-earth-distance-library.html)","funding_links":[],"categories":["PHP"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjtejido%2Fgeodesy-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjtejido%2Fgeodesy-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjtejido%2Fgeodesy-php/lists"}