2017 © Pedro Peláez
 

library haversini-formula

This PHP class can replace the Google Distance Matrix to calculate the distance between two points using latitude and longitude. It will prevent you to do massive requests to Google servers and enhance your service performance.

image

rafaelfragoso/haversini-formula

This PHP class can replace the Google Distance Matrix to calculate the distance between two points using latitude and longitude. It will prevent you to do massive requests to Google servers and enhance your service performance.

  • Wednesday, January 31, 2018
  • by rafaelfragoso
  • Repository
  • 5 Watchers
  • 16 Stars
  • 1,399 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 2 Open issues
  • 2 Versions
  • 13 % Grown

The README.md

php-haversini-formula Build Status

Calculates de distance between two geocode points 📌🗺, (*1)

How to use it:

Install the library via Composer or clone the repo:, (*2)

composer install rafaelfragoso/haversini-formula, (*3)

After the installation is complete, you can load the class and start using it., (*4)

<?php

use Haversini\Haversini;

/*
 * Calculate distance from Rio de Janeiro to São Paulo
 * Rio: -22.906847, -43.172896
 * São Paulo: -23.550520, -46.633309
 */
Haversini::calculate(
    -22.906847,
    -43.172896,
    -23.550520,
    -46.633309,
    'mi' // Output length unit
);

Running tests

make test or make test-coverage, (*5)

XDebug is required for test coverage!, (*6)

Authors

See also the list of contributors who participated in this project., (*7)

License

This project is licensed under the MIT License - see the LICENSE.md file for details, (*8)

The Versions

31/01 2018

dev-master

9999999-dev https://github.com/rafaelfragosom/php-haversine-formula

This PHP class can replace the Google Distance Matrix to calculate the distance between two points using latitude and longitude. It will prevent you to do massive requests to Google servers and enhance your service performance.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by Rafael Fragoso

28/08 2015

1.0.0

1.0.0.0 https://github.com/rafaelfragosom/php-haversine-formula

This PHP class can replace the Google Distance Matrix to calculate the distance between two points using latitude and longitude. It will prevent you to do massive requests to Google servers and enhance your service performance.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by Rafael Fragoso