2017 © Pedro Peláez
 

library geodistance-php

Calculate geodistance between two points, latitude and longitude

image

0x13a/geodistance-php

Calculate geodistance between two points, latitude and longitude

  • Friday, November 10, 2017
  • by diegomariani
  • Repository
  • 4 Watchers
  • 24 Stars
  • 2,683 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 5 Versions
  • 30 % Grown

The README.md

Geodistance

Build Status Latest Stable Version Total Downloads License composer.lock, (*1)

simple & minimal geodistance php library to calculate geo distance between two points (latitude, longitude) using Harvesine formula, (*2)

Installation

``` bash composer require 0x13a/geodistance-php, (*3)


## Usage ```php <?php require_once __DIR__ . '/vendor/autoload.php'; use function Geodistance\centimeters; use function Geodistance\feet; use function Geodistance\kilometers; use function Geodistance\miles; use function Geodistance\meters; use function Geodistance\yards; use Geodistance\Location; $new_york = new Location(40.7128, 74.0059); $los_angeles = new Location(34.0522, 118.2437); $decimal_precision = 3; echo kilometers($new_york, $los_angeles); // 3936 echo miles($new_york, $los_angeles, $decimal_precision); // 2445.564 echo yards($new_york, $los_angeles); // 4304181 echo feet($new_york, $los_angeles); // 12912543 echo centimeters($new_york, $los_angeles); // 393575500 echo meters($new_york, $los_angeles); // 3935755

License

Geodistance PHP is licensed under the MIT license. See License File for more information., (*4)

The Versions

10/11 2017

dev-master

9999999-dev

Calculate geodistance between two points, latitude and longitude

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Avatar diegomariani

distance gps geodistance harvesine

28/05 2017

0.4

0.4.0.0

Calculate geodistance between two points, latitude and longitude

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Avatar diegomariani

distance gps geodistance harvesine

23/05 2017

0.3

0.3.0.0

Calculate geodistance between two points, latitude and longitude

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Avatar diegomariani

distance gps geodistance harvesine

31/12 2016

0.2

0.2.0.0

Calculate geodistance between two points, latitude and longitude

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Avatar diegomariani

distance gps geodistance harvesine

06/10 2016

0.1

0.1.0.0

Calculate geodistance between two points, latitude and longitude

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Avatar diegomariani

distance gps geodistance harvesine