PHP Location Library
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
tests
.gitignore
.php_cs.dist
.travis.yml
README.md
composer.json
phpunit.xml.dist

README.md

PHP Location Library Build Status

A library for geospatial calculations in PHP.

Installation

Using composer, run composer require ricklab/location

Usage

A brief example of how this library can be used:

$point = new Ricklab\Location\Geometry\Point($longitude, $latitude);
$point2 = new Ricklab\Location\Geometry\Point($lon2, $lat2);
$distance = $point->distanceTo($point2, 'miles');
$line = new Ricklab\Location\Geometry\LineString([$point, $point2]);