I am a huge fan of geohashes. I think they are a very elegant and quick solution for many problems. Sure, they may have some less than ideal properties, but overall, they are incredibly useful. The point of this post is not to describe geohashes or dive deeply into the various implementation and use cases. I wanted to focus on one particular issue with geohashes … their size.
In most documentation you table that looks roughly like the following:
Hash Length
Width
Height
1
4604.5 km
5003.8 km
2
1249.4 km
625.5 km
3
156.4 km
156.4 km
4
39.1 km
19.5 km
…
…
…
This table is generally accompanied by a brief note that these sizes are approximate and correspond to hashes near the equator. Geohashes near the poles are significantly smaller. I am always wondering how large is a particular length geohash at various latitudes but I haven’t been able to find a quick resource to give me an idea of the size of a geohash at a given latitude. I wrote a bit of python code and created a few tables of geohash sizes at different latitudes.
A closer inspection of the following tables shows that the height (North-South) dimension of the geohash doesn’t change but the width (East-West) dimension does. Also, note these sizes are identical for latitudes in the Norther and Southern Hemispheres. The size of the geohash does not vary at different longitudes.