GeoHash算法

GeoHash

Geohash is a latitude/longitude geocode system invented by Gustavo Niemeyer when writing the web service at geohash.org, and put into the public domain. It is a hierarchical spatial data structure which subdivides space into buckets of grid shape.

简单说,GeoHash是一个将经纬度信息编码成一个string的算法。从而便于储存、查找。

GeoHash算法的步骤

GeoHash对经度纬度分别编码,原理是迭代做二分,进而逼近真实值。

我们以纬度举例 …

more ...