Geohash Vs OLC: Evaluating the geocoding techniques in adtech
By: Kartik Bhanot
Tags: Hyperlocal, Tech Talk, Geospatial, Advertising, Data Science

One of the biggest challenges in hyperlocal online advertising is to formulate a scalable geocoding technique for creating efficient user pools with different client configurable radii around a point of interest (POI). The size of POIs or the target physical store vary enormously and a highly flexible yet scalable technique has to be implemented to get the best results.

The two most prominent techniques for geocoding are Open Location Code (OLC) and Geohash. Both techniques have pros and cons, and a unique set of use cases.

The Open Location Code (OLC) is a geocoding system for identifying an area anywhere on Earth. It’s designed to be used as a street address and may be especially useful in places where there is no formal system to identify buildings, such as street names, house numbers, and postcodes.

OLCs are derived from latitude and longitude coordinates so they already exist everywhere. They are similar in length to a telephone number. For example, 87G8Q257+5QP is the 10 character plus code for Times Square, New York. Often these codes can be shortened to only four or six digits when combined with a locality (Q257+5QP).

Source: Google Maps

The above figure shows the 14m side square box representing the 10 characters plus code (OLC) for Times Square. The radius represented here is not sufficient to build audiences for targeting users around the vicinity of a store. This area can be increased by using an 8-character OLC code which covers a square box of 275 metres in length, but the leakages associated in building audiences from this large of radii would be higher than the size of most store locations themselves. The inability of OLCs to strike a fine balance between having sufficient devices to build audiences and also avoiding leakages lead us to explore geohashes in depth.

A Geohash is a public domain geocoding system which encodes a geographic location into a short string of letters and digits. It is a hierarchical spatial data structure which subdivides space into buckets in a grid.

Geohashes offer properties like arbitrary precision and the possibility of gradually removing characters from the end of the code to reduce its size (and gradually lose precision). As a consequence of the gradual precision degradation, nearby places will often (but not always) present similar prefixes. The longer a shared prefix is, the closer the two places are geographical.

The above figure shows the 153m side square box representing the 7-character geohash code for Times Square, NY. The above geohash solves the two issues discussed earlier — scale and avoiding leakages. This geohash gives enough scale to get sufficient devices to build an audience around a store as compared to only a 14m square box in case of OLCs. The leakages around a branded store are also minimized as the captured radii (153 m) is much less than the next available configuration in OLCs (275 m). Another added advantage of geohashes is the ability to get all the neighboring geohashes for the central geohash. This significantly helps us build configurable radius for analyzing the movement of audiences through different radii, for example, 500 m,1000 m, etc to the smallest radii range (153 m) with minimal leakages and maximum possible audience coverage.