GithubHelp home page GithubHelp logo

bhanditz / php-haversine-formula Goto Github PK

View Code? Open in Web Editor NEW

This project forked from orafaelfragoso/php-haversine-formula

0.0 2.0 0.0 530 KB

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.

License: MIT License

PHP 100.00%

php-haversine-formula's Introduction

World Distance

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's API and enhance your service's performance.

How to use it:

Install the library via Composer or clone the repo:

php composer.phar install rafaelfragoso/haversini-formula

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

<?php

use RFHaversini\Distance;

$inKilometers = Distance::toKilometers(30.261699, -97.738967, 29.869229, -97.959595);
$inMiles      = Distance::toMiles(30.261699, -97.738967, 29.869229, -97.959595);

Running tests

php composer.phar test

This will run the tests and generate a coverage folder inside tests.

XDebug is required for test coverage!

php-haversine-formula's People

Contributors

orafaelfragoso avatar jono20201 avatar karinakozarova avatar sokolnikov911 avatar jake5253 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.