Geohash距离估算

http://www.cnblogs.com/LBSer/p/3298057.htmlhtml

1、经纬度距离换算post

a)在纬度相等的状况下:编码

 经度每隔0.00001度,距离相差约1米;htm

 每隔0.0001度,距离相差约10米;blog

 每隔0.001度,距离相差约100米;ip

 每隔0.01度,距离相差约1000米;get

 每隔0.1度,距离相差约10000米。hash

 b)在经度相等的状况下:it

 纬度每隔0.00001度,距离相差约1.1米;table

 每隔0.0001度,距离相差约11米;

 每隔0.001度,距离相差约111米;

 每隔0.01度,距离相差约1113米;

 每隔0.1度,距离相差约11132米。

2、Geohash距离换算(使用base32编码)

若是geohash的位数是9位数的时候,大概为附近2米

下表摘自维基百科:http://en.wikipedia.org/wiki/Geohash

geohash length
lat bits
lng bits
lat error
lng error
km error
1 2 3 ±23 ±23 ±2500
2 5 5 ± 2.8 ± 5.6 ±630
3 7 8 ± 0.70 ± 0.7 ±78
4 10 10 ± 0.087 ± 0.18 ±20
5 12 13 ± 0.022 ± 0.022 ±2.4
6 15 15 ± 0.0027 ± 0.0055 ±0.61
7 17 18 ±0.00068 ±0.00068 ±0.076
8 20 20 ±0.000085 ±0.00017 ±0.019

转载于:https://www.cnblogs.com/LBSer/p/3298057.html