Geohash Size Variation by Latitude

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.

Latitude: 0°

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
5 4.9 km 4.9 km
6 1.2 km 610.8 m
7 152.7 m 152.7 m
8 38.2 m 19.1 m
9 4.8 m 4.8 m
10 1.2 m 596.5 mm
11 149.1 mm 149.1 mm
12 37.3 mm 18.6 mm

Latitude: 15°

Hash Length Width Height
1 4604.5 km 5003.8 km
2 1213.3 km 625.5 km
3 151.2 km 156.4 km
4 37.8 km 19.5 km
5 4.7 km 4.9 km
6 1.2 km 610.8 m
7 147.5 m 152.7 m
8 36.9 m 19.1 m
9 4.6 m 4.8 m
10 1.2 m 596.5 mm
11 144.0 mm 149.1 mm
12 36.0 mm 18.6 mm

Latitude: 30°

Hash Length Width Height
1 4604.5 km 5003.8 km
2 1072.5 km 625.5 km
3 135.1 km 156.4 km
4 33.9 km 19.5 km
5 4.2 km 4.9 km
6 1.1 km 610.8 m
7 132.2 m 152.7 m
8 33.1 m 19.1 m
9 4.1 m 4.8 m
10 1.0 m 596.5 mm
11 129.1 mm 149.1 mm
12 32.3 mm 18.6 mm

Latitude: 45°

Hash Length Width Height
1 1872.8 km 5003.8 km
2 839.3 km 625.5 km
3 109.2 km 156.4 km
4 27.6 km 19.5 km
5 3.5 km 4.9 km
6 863.8 m 610.8 m
7 108.0 m 152.7 m
8 27.0 m 19.1 m
9 3.4 m 4.8 m
10 843.6 mm 596.5 mm
11 105.4 mm 149.1 mm
12 26.4 mm 18.6 mm

Latitude: 60°

Hash Length Width Height
1 1872.8 km 5003.8 km
2 642.4 km 625.5 km
3 78.7 km 156.4 km
4 19.5 km 19.5 km
5 2.4 km 4.9 km
6 610.8 m 610.8 m
7 76.4 m 152.7 m
8 19.1 m 19.1 m
9 2.4 m 4.8 m
10 596.5 mm 596.5 mm
11 74.6 mm 149.1 mm
12 18.6 mm 18.6 mm

Latitude: 75°

Hash Length Width Height
1 1872.8 km 5003.8 km
2 303.5 km 625.5 km
3 39.9 km 156.4 km
4 10.1 km 19.5 km
5 1.3 km 4.9 km
6 316.2 m 610.8 m
7 39.5 m 152.7 m
8 9.9 m 19.1 m
9 1.2 m 4.8 m
10 308.8 mm 596.5 mm
11 38.6 mm 149.1 mm
12 9.6 mm 18.6 mm

Latitude: 89.9°

Hash Length Width Height
1 1872.8 km 5003.8 km
2 61.3 km 625.5 km
3 1.9 km 156.4 km
4 60.0 m 19.5 km
5 9.4 m 4.9 km
6 2.2 m 610.8 m
7 265.4 mm 152.7 m
8 66.6 mm 19.1 m
9 8.3 mm 4.8 m
10 2.1 mm 596.5 mm
11 0.3 mm 149.1 mm
12 0.1 mm 18.6 mm