Skip to main content

Posts

Showing posts from April, 2018

GeodesyPHP - A Great-Earth Distance library

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 transforming different Reference Datums. It provides distance calculations thru: Spherical Law of Cosines Haversine formula  (Half a Versine - versed sine) Vincenty's formula Thomas' formula Hubeny's formula Andoyer-Lambert's formula Elliptic Distance Forsythe-Andoyer-Lambert Formula Note: This library is a collection that solves the Inverse geodetic problem . Installation: composer require jtejido/geodesy-php Usage Distance Calculation All classes receives and gives all values in  Metre unit of length by default. use Geodesy\Location\LatLong; use Geodes...