geoprimsField-grade geospatial math

Geohash neighbors

The 8 geohash cells around a geohash, wrapping across the antimeridian; past a pole there is no neighbor.

dppn5fyxz

The north neighbor is dppn5fyxz and the east neighbor is dppn5fyz8.

Northeast
East
Southeast
South
Southwest
West
Provenance
Computed by
indexing.geohash.neighbors 1.0.0, core 0.1.0
Model
Encode the center shifted one cell in each direction, longitude wrapped
Accuracy
Exact
Notes
None
Cites
Niemeyer, G., geohash.org, Geohash (public domain algorithm)

Something look off?

Your values

Showing an example. Change anything.
Run many at once from a CSV

Loading…

How we got thisFormula, worked example, sources, and proof

Model: Encode the center shifted one cell in each direction, longitude wrapped

Accuracy: Exact

When to use this: Use this when a proximity search has to look past one cell: the eight geohashes surrounding a cell, which is how a geohash index avoids missing points that sit just over a boundary. It wraps across the antimeridian, so a search near it still finds its neighbors. It is also how a tile-like index is walked: given one cell, the eight around it give the next ring of keys to fetch, which is the standard pattern for a bounding-box or radius query on a geohash-keyed store.

Limitations: Neighbors are cells of the same precision, so a query still has to filter by true distance afterward: the ring covers the cell's surroundings unevenly, especially at high latitudes. At a pole there is no cell beyond, which the result reports rather than wrapping to something wrong. Neighbor cells are the same size as the origin, so at coarse precisions the ring covers a very large area, and at fine ones nine cells may not reach far enough for the radius you want.

Worked example: Around dppn5fyxx. Source: Geohash neighbor definition.

You enter

Geohash
dppn5fyxx

You get

North
dppn5fyxz
Northeast
dppn5fyzb
East
dppn5fyz8
Southeast
dppn5fyz2
South
dppn5fyxr
Southwest
dppn5fyxq
West
dppn5fyxw
Northwest
dppn5fyxy

Review: Not yet independently reviewed by a GIS professional.

Last verified: 2026-09-18, when a maintainer last confirmed this tool's sources at the issuer. See the sources ledger.

Status: version 1.0.0, core 0.1.0. See this tool in the verification report.

Changes

Checked against: 24 golden test vectors (download the test vectors, each with its source and tolerance). See how results are checked and every source.

Sources