http://www.cnblogs.com/LBSer/p/3298057.html
一、經緯度距離換算
a)在緯度相等的情況下:
經度每隔0.00001度,距離相差約1米;
每隔0.0001度,距離相差約10米;
每隔0.001度,距離相差約100米;
每隔0.01度,距離相差約1000米;
每隔0.1度,距離相差約10000米。
b)在經度相等的情況下:
緯度每隔0.00001度,距離相差約1.1米;
每隔0.0001度,距離相差約11米;
每隔0.001度,距離相差約111米;
每隔0.01度,距離相差約1113米;
每隔0.1度,距離相差約11132米。
二、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 | ±2500 | |
5 | ± 2.8 | ± 5.6 | ±630 | ||
7 | 8 | ± 0.70 | ± 0.7 | ±78 | |
4 | 10 | ± 0.087 | ± 0.18 | ±20 | |
12 | 13 | ± 0.022 | ±2.4 | ||
6 | 15 | ± 0.0027 | ± 0.0055 | ±0.61 | |
17 | 18 | ±0.00068 | ±0.076 | ||
20 | ±0.000085 | ±0.00017 | ±0.019 |
轉載請标明源位址:http://www.cnblogs.com/LBSer