https://geohash.softeng.co/
Index Precision | Bounding Box |
---|---|
1 | ≤ 5,000km X 5,000 Km |
2 | ≤ 1,250km X 625km |
3 | ≤ 156km X 156km |
4 | ≤ 39.1km X 19.5km |
5 | ≤ 4.89km X 4.89km |
6 | ≤ 1.22km X 0.61km |
7 | ≤ 153m X 153m |
8 | ≤ 38.2m X 19.1m |
9 | ≤ 4.77m X 4.77m |
10 | ≤ 1.19m X 0.596m |
11 | ≤ 149mm X 149mm |
12 | ≤ 37.2mm X 18.6mm |
sx8dfsymrrcc
(reference point)sx8dfsymrrc
9 (0.13 meters away)sx8dfsymrr
11 (0.62 meters away)sx8dfsymr
1qn (5.19 meters away)sx8dfsy
2j3dm (141.8 meters away)# A tibble: 60 × 3
name rating price_level
<chr> <dbl> <int>
1 Espresso Love 4.4 1
2 Caffè Nero 4.2 2
3 Ogawa Coffee 4.6 2
4 George Howell Coffee 4.6 2
5 Render Coffee 4.4 1
6 Jaho Coffee Roaster & Wine Bar 4.3 2
7 The Well Coffee House 4.7 1
8 Kohi Coffee Company 4.7 1
9 Caffè Nero 4.1 2
10 Caffè Nero 4.4 2
# ℹ 50 more rows
# A tibble: 7 × 3
name geohash shared_chars
<chr> <chr> <int>
1 Caffè Nero drt2yyx9mj6t 6
2 George Howell Coffee drt2yyqwe8r7 6
3 Caffè Nero drt2yynp0vqs 6
4 Thinking Cup drt2yykfq0r5 6
5 Starbucks drt2yywg71qc 6
6 Starbucks drt2yyrmzf78 6
7 Starbucks drt2yy8zuexj 6
00010111
00101010
01000000 00110011 00000111 10101110
00010100 01111010 11100001 01000111
01000000 00110011 00000111 10101110
00010100 01111010 11100001 01000111
01000000 00110011 00000111 10101110
00010100 01111010 11100001 01000111
01000000 00110011 00000111 10101110
x = 19
[-180, 180)
[-180, 0)
, [0, 180)
x = 19
[0, 180)
[0, 90)
, [90, 180)
0
y = 47
[-90, 90)
[-90, 0)
, [0, 90)
Binary != GeoHash
0, 1, 2, 3, 4, 5, 6, 7, 8, 9
0, 1
A-Z
2-7
RFC 4648
0-9
a-z (except a, i, l, o)
00000 == 0
11111 == 31
BASE32[26]
BASE32[26] == 'u'
BASE32[2] == '2'
u 2 n f 9 0
1 dim mapping from (x, y)
1
1 0
11001 00100 00001 11111
25 4 1 31
base32_conversion <- function(x) {
bit_lu <- c('0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'b', 'c', 'd', 'e', 'f', 'g',
'h', 'j', 'k', 'm', 'n', 'p', 'q', 'r',
's', 't', 'u', 'v', 'w', 'x', 'y', 'z')
# add 1 b/c R is 1 base indexed
position <- strtoi(paste(x, collapse = ""), 2) + 1
bit_lu[position]
}
[1] "u" "2" "m" "e" "2" "k" "5" "6" "u" "5" "4" "b"
[1] "u2me2k56u54b"