Geohash
Geohash encoding, decoding, and neighbors.
Geohashes name a rectangle on the map with a short base-32 string, and each added character makes the box smaller. These tools encode and decode geohashes, find a cell's eight neighbors, and list the cells that cover a box or polygon. Developers use them for string keys, prefix searches, and simple spatial bucketing. Start with the encoder, which shows the cell's size and bounds at any length. Pitfall: points just across a cell edge can share no prefix at all, so always search a cell together with its neighbors.
I want to encode or decode a geohash
- Geohash encoder
The geohash for a latitude and longitude at precision 1 to 12, with the cell's size and bounds.
- Geohash decoder
The center, bounding box, and error margins of a geohash.
I want to find a geohash's neighbors
- Geohash neighbors
The 8 geohash cells around a geohash, wrapping across the antimeridian; past a pole there is no neighbor.
I want to list the geohashes over a box or polygon
- Geohashes covering an area
Every geohash at a precision that touches a bounding box or polygon, or only those whose centers fall inside, for indexing or querying an area.