Geohash / proximity searches in pure, uncut Erlang
%% to encode a lat/lon
geohash:encode(38.897, -77.036).
%% would yield "dqcjr0bp7n74"
%% or if you want to control the "precision"
geohash:encode(38.897, -77.036, 10).
%% would yield "dqcjr0bp7n"
%% to encode a lat/lon
geohash:decode("dqcjr0bp7n74").
%% would yield [{lat,38.89699992723763},{lon,-77.0359998755157}]
%% to get the surrounding area hashes to test proximity
geohash:adjacent("dqcjr0bp7n74", top).
%% would yield "dqcjr0bp7n75" (which you may now decode to a lat/lon as well)
Supported directions are top, left, right, bottom (may change in future to north, south, east, west)
Still need to implement (probably via gb_tree) a manner to search for nearby hashes.
This does not lend itself towards global searches (see the wikipedia article as to why). If you're doing "local" searches in the same country or really just the same hemisphere, you should be fine.