Geohash距离估算 附近的人的距离

一、经纬度距离换算

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 ±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://blog.csdn.net/qq_22929803/article/details/51039877



一、经纬度距离换算

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 ±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

猜你喜欢

转载自blog.csdn.net/varyall/article/details/80973705