PHPackages                             toin0u/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. toin0u/geotools

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

toin0u/geotools
===============

Geo-related tools PHP 7.3+ library

1.3.1(1mo ago)1.4k1.3k127[22 issues](https://github.com/toin0u/Geotools/issues)[3 PRs](https://github.com/toin0u/Geotools/pulls)MITPHPPHP ^7.3 || ^7.4 || ^8.0

Since Feb 6Pushed 1mo ago44 watchersCompare

[ Source](https://github.com/toin0u/Geotools)[ Packagist](https://packagist.org/packages/toin0u/geotools)[ RSS](/packages/toin0u-geotools/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (20)Versions (39)Used By (0)

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/ab5f99fcf0a9f8360b790d9d71e9c72b302294c32d1ea651993458fa432eb5e4/68747470733a2f2f706f7365722e707567782e6f72672f6c65616775652f67656f746f6f6c732f762f737461626c65)](https://github.com/thephpleague/geotools/releases)[![Total Downloads](https://camo.githubusercontent.com/3d8f849d3df584cd0f154526adbff1a27e8be11521661a57d25fa3a9b9fe28d5/68747470733a2f2f706f7365722e707567782e6f72672f6c65616775652f67656f746f6f6c732f646f776e6c6f616473)](https://packagist.org/packages/league/geotools)[![Quality Score](https://camo.githubusercontent.com/6a11a3817a2d903c51bdf5d263e28d19edc62bdbb13d63ebb5baafb4505779f0/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7468657068706c65616775652f67656f746f6f6c732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/thephpleague/geotools/?branch=master)

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 **PSR-6** 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:

```
composer require league/geotools

```

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

And install dependencies:

```
composer install

```

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

```
