I'll describe the details of the points of interest processing in a future post. In this post, I will describe Geohash visually because I believe it is easier for some people (like myself) to understand and it would had saved me a some time had anyone else done it.
First, the whole globe is divided in 32, 4 rows and 8 columns, and to each cell is given an alpha-numeric character.
At this level, the Geohash is not very precise as the cells are too big. To improve precision, each cell can be recursively subdivided in 32 parts until the desired precision is achieved. The final Geohash is the concatenation of the cells Geohash chosen along the way. For instance, the picture below show the cell D (from the picture above) divided and the new sub-cells labels.
|Midtown NYC level 5 cell|
Lastly, one may need to understand how the cells are spatially laid out. In my case, I needed to calculate all the neighbors for a given cell and having this visual representation helped me to create test cases. The cells are organized in z-like order that starts on the bottom left corner and finishes in the top right corner, as displayed in the picture below.
|Z-like order of the Geohashes|
Geohash is a very useful concept and I hope this post helps people to understand it.