Geohash neighbors
The 8 geohash cells around a geohash, wrapping across the antimeridian; past a pole there is no neighbor.
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?
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
- 2026-09-19, changed: Every indexing tool is now stable. Geohash decode and neighbors match pygeohash on 1,000 and 500 cases; the Plus Code tools pass every row of the Open Location Code test data; tile ground resolution matches the Bing Maps table; the H3 resolution chooser matches H3's resolution table; and H3 polygon fill gives H3 C's own test counts (1,253 cells, 1,214 with a hole). Results are unchanged apart from the fix below. Changelog
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
- Geohash (public domain algorithm), Niemeyer, G., geohash.org, Original description, as archived (the site is gone). Base-32 alphabet 0123456789bcdefghjkmnpqrstuvwxyz, longitude bit first.
Learn the concept: What is a geohash? Precision and edge cases