Php Haversine Formula Save

Calculates de distance between two geocode points 📌🗺

Project README

php-haversini-formula Build Status

Calculates de distance between two geocode points 📌🗺

How to use it:

Install the library via Composer or clone the repo:

composer install rafaelfragoso/haversini-formula

After the installation is complete, you can load the class and start using it.

<?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

XDebug is required for test coverage!

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Open Source Agenda is not affiliated with "Php Haversine Formula" Project. README Source: orafaelfragoso/php-haversine-formula
Stars
44
Open Issues
2
Last Commit
8 months ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating