PHPackages                             geo/geohash - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. geo/geohash

Abandoned → [lvht/geohash](/?search=lvht%2Fgeohash)Library[Utility &amp; Helpers](/categories/utility)

geo/geohash
===========

geohash like python-geohash

v1.1.0(8y ago)7664626[2 issues](https://github.com/lvht/geohash/issues)MITPHPPHP &gt;=5.4.0

Since Sep 11Pushed 7y ago3 watchersCompare

[ Source](https://github.com/lvht/geohash)[ Packagist](https://packagist.org/packages/geo/geohash)[ Docs](http://github.com/lvht/geohash)[ RSS](/packages/geo-geohash/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (2)DependenciesVersions (4)Used By (0)

GeoHash
=======

[](#geohash)

Simple php geohash class like python-geohash.

Getting Started
---------------

[](#getting-started)

### Install

[](#install)

composer require lvht/geohash

### System Requirements

[](#system-requirements)

You need **PHP &gt;= 5.4.0**.

### Usage

[](#usage)

Encode a coordinate:

```
use Lvht\GeoHash;
echo GeoHash::encode(117.031689,36.65396);

```

The result is wwe0x0euu12.

The default precision is 0.00001 which can be changed by the third parameter of encode method.

Find the neighbors for a given geohash:

```
use Lvht\GeoHash;
var_dump(GeoHash::expand('wwe0x0'));

```

and the result is:

```
array(8) {
  [0] =>
  string(11) "wwe0wc7zzzz"
  [1] =>
  string(11) "wwe0x17zzzz"
  [2] =>
  string(11) "wwe0x37zzzz"
  [3] =>
  string(11) "wwe0wb7zzzz"
  [4] =>
  string(11) "wwe0x27zzzz"
  [5] =>
  string(11) "wwe0qz7zzzz"
  [6] =>
  string(11) "wwe0rp7zzzz"
  [7] =>
  string(11) "wwe0rr7zzzz"
}

```

Decode a geohash string:

```
Use Lvht\GeoHash;
var_dump(GeoHash::decode('wwe0x0'));

```

and the result is:

```
array(4) {
  [0] =>
  double(117.0263671875)    # min longitude
  [1] =>
  double(117.03735351562)   # max longitude
  [2] =>
  double(36.650390625)      # min latitude
  [3] =>
  double(36.655883789062)   # max latitude
}

```

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 60% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~721 days

Total

3

Last Release

3231d ago

Major Versions

v0.1 → v1.0.02016-07-28

PHP version history (2 changes)v0.1PHP &gt;=5.3.0

v1.0.0PHP &gt;=5.4.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/103414201?v=4)[lvht](/maintainers/lvht)[@lvht](https://github.com/lvht)

---

Top Contributors

[![taoso](https://avatars.githubusercontent.com/u/2030591?v=4)](https://github.com/taoso "taoso (3 commits)")[![1d10t](https://avatars.githubusercontent.com/u/553280?v=4)](https://github.com/1d10t "1d10t (1 commits)")[![thbourlove](https://avatars.githubusercontent.com/u/1768066?v=4)](https://github.com/thbourlove "thbourlove (1 commits)")

---

Tags

geohash

### Embed Badge

![Health badge](/badges/geo-geohash/health.svg)

```
[![Health](https://phpackages.com/badges/geo-geohash/health.svg)](https://phpackages.com/packages/geo-geohash)
```

###  Alternatives

[lvht/geohash

geohash like python-geohash

76595.1k1](/packages/lvht-geohash)[saikiran/geohash

Geohash Algorithm to encode geographic coordinates to a string of letters and digits

44501.9k3](/packages/saikiran-geohash)[laravie/geotools

Geo-related tools PHP 7+ library

18122.1k1](/packages/laravie-geotools)[beste/latlon-geohash

Gustavo Niemeyer's geocoding system

1057.7k](/packages/beste-latlon-geohash)[latrell/geohash

This package geohash for Laravel 5 support.

1128.4k](/packages/latrell-geohash)[cevin/geohash

Geohash library for php

192.1k](/packages/cevin-geohash)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
