PHPackages                             adeb6600/geotools - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. adeb6600/geotools

ActiveLibrary[Queues &amp; Workers](/categories/queues)

adeb6600/geotools
=================

Geo-related tools PHP 5.3 library

0.6.1(10y ago)0671MITPHPPHP &gt;=5.4

Since Feb 6Pushed 10y ago1 watchersCompare

[ Source](https://github.com/adeb6600/geotools)[ Packagist](https://packagist.org/packages/adeb6600/geotools)[ Docs](http://geotools-php.org/)[ RSS](/packages/adeb6600-geotools/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (10)Versions (26)Used By (1)

Geotools
========

[](#geotools)

**Geotools** is a PHP geo-related library, built atop [Geocoder](https://github.com/willdurand/Geocoder) and [React](https://github.com/reactphp/react) libraries.

[![Latest Version](https://camo.githubusercontent.com/b5cb8469bcf65b22582ca2dadb66e2ca587b8e227e1e42ad4a7a375127c6a8b0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f7468657068706c65616775652f67656f746f6f6c732e7376673f7374796c653d666c61742d737175617265)](https://github.com/thephpleague/geotools/releases)[![Total Downloads](https://camo.githubusercontent.com/e84d29780a6b1c15b3b846fe08d76213e5513be19ea153bd8863166b0cbda513/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c65616775652f67656f746f6f6c732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/league/geotools)[![Build Status](https://camo.githubusercontent.com/b452819162bc7a2384cd4c5f6cf847a58dd1b8a3a37f5b4caa3cf063f5c8de12/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7468657068706c65616775652f67656f746f6f6c732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/thephpleague/geotools)[![Quality Score](https://camo.githubusercontent.com/6a11a3817a2d903c51bdf5d263e28d19edc62bdbb13d63ebb5baafb4505779f0/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7468657068706c65616775652f67656f746f6f6c732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/thephpleague/geotools/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/87254f5ba3ca65e4c95fcdad1e07925831bebe3f625b67e21abebd5083ba13d7/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f7468657068706c65616775652f67656f746f6f6c732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/thephpleague/geotools)[![SensioLabs Insight](https://camo.githubusercontent.com/93ab1667c4d06c94c4ae59b695f72f90c60e5a52ddfd561ecc93785c2b232902/68747470733a2f2f696d672e736869656c64732e696f2f73656e73696f6c6162732f692f37643262343438662d623232332d346462392d396661622d3936636465646564663033642e7376673f7374796c653d666c61742d737175617265)](https://insight.sensiolabs.com/projects/7d2b448f-b223-4db9-9fab-96cdededf03d)[![HHVM Status](https://camo.githubusercontent.com/09370d343a719b6f0fb9aac2699fe74b99b93eda945a0aac554750e76f4d6352/68747470733a2f2f696d672e736869656c64732e696f2f6868766d2f6c65616775652f67656f746f6f6c732e7376673f7374796c653d666c61742d737175617265)](http://hhvm.h4cc.de/package/league/geotools)

Features
--------

[](#features)

- **Batch** geocode &amp; reverse geocoding request(s) in **series** / in **parallel** against one or a **set of providers**. [»](#batch)
- **Cache** geocode &amp; reverse geocoding result(s) with **Redis**, **Memcached** or **MongoDB**to improve performances. [»](#batch)
- Compute geocode &amp; reverse geocoding in the **command-line interface** (CLI) + dumpers and formatters. [»](#cli)
- Accept **almost** all kind of WGS84 [geographic coordinates](http://en.wikipedia.org/wiki/Geographic_coordinate_conversion) as coordinates. [»](#coordinate--ellipsoid)
- Support **23 different ellipsoids** and it's easy to provide a new one if needed. [»](#coordinate--ellipsoid)
- **Convert** and **format** decimal degrees coordinates to decimal minutes or degrees minutes seconds coordinates. [»](#convert)
- **Convert** decimal degrees coordinates in the [Universal Transverse Mercator](http://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system)(UTM) projection. [»](#convert)
- Compute the distance in **meter** (by default), **km**, **mi** or **ft** between two coordinates using **flat**, **great circle**, **haversine** or **vincenty** algorithms. [»](#distance)
- Compute the initial and final **bearing** from the origin coordinate to the destination coordinate in degrees. [»](#point)
- Compute the initial and final **cardinal point** (direction) from the origin coordinate to the destination coordinate, read more in [wikipedia](http://en.wikipedia.org/wiki/Cardinal_direction). [»](#point)
- Compute the **half-way point** (coordinate) between the origin and the destination coordinates. [»](#point)
- Compute the **destination point** (coordinate) with given bearing in degrees and a distance in meters. [»](#point)
- Encode a coordinate to a **geo hash** string and decode it to a coordinate, read more in [wikipedia](http://en.wikipedia.org/wiki/Geohash) and on [geohash.org](http://geohash.org/). [»](#geohash)
- Encode a coordinate via the 10:10 algorithm. [»](#1010)
- **Polygon** class provides methods to check either a poing (coordinate) is in, or on the polygon's boundaries. [»](#polygon)
- A **command-line interface** (CLI) for **Distance**, **Point**, **Geohash** and **Convert** classes. [»](#cli)
- Integration with Frameworks: **Laravel 4**, **Silex** ... [»](#integration-with-frameworks)
- ... more to come ...

Installation
------------

[](#installation)

**Geotools** can be found on [Packagist](https://packagist.org/packages/league/geotools). The recommended way to install **Geotools** is through [composer](http://getcomposer.org).

Run the following on the command line:

```
php composer require adeb6600/geotools=@stable

```

**Protip:** you should browse the [`league/geotools`](https://packagist.org/packages/league/geotools)page to choose a stable version to use, avoid the `@stable` meta constraint.

**Important:** you should use the `0.4` version if you use Geocoder `2.x` or/and PHP `5.3`.

And install dependencies:

```
$ curl -sS https://getcomposer.org/installer | php
$ php composer.phar install
```

Now you can add the autoloader, and you will have access to the library:

```
