You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
http://en.wikipedia.org/wiki/Geohash[Geohashes] are a way of encoding
5
-
`lat/lon` points as strings.((("geohashes")))((("latitude/longitude pairs", "encoding lat/lon points as strings with geohashes")))((("strings", "geohash"))) The original intention was to have a
6
-
URL-friendly way of specifying geolocations, but geohashes have turned out to
7
-
be a useful way of indexing geo-points and geo-shapes in databases.
8
-
9
-
Geohashes divide the world into a grid of 32 cells--4 rows and 8 columns--each represented by a letter or number. The `g` cell covers half of
10
-
Greenland, all of Iceland, and most of Great Britian. Each cell can be further
11
-
divided into another 32 cells, which can be divided into another 32 cells,
12
-
and so on. The `gc` cell covers Ireland and England, `gcp` covers most of
13
-
London and part of Southern England, and `gcpuuz94k` is the entrance to
14
-
Buckingham Palace, accurate to about 5 meters.
15
-
16
-
In other words, the longer the geohash string, the more accurate it is. If
17
-
two geohashes share a prefix— and `gcpuuz`—then it implies that
18
-
they are near each other. The longer the shared prefix, the closer they
19
-
are.
20
-
21
-
That said, two locations that are right next to each other may have completely
22
-
different geohashes. For instance, the
23
-
http://en.wikipedia.org/wiki/Millennium_Dome[Millenium Dome] in London has
24
-
geohash `u10hbp`, because it falls into the `u` cell, the next top-level cell
25
-
to the east of the `g` cell.
26
-
27
-
Geo-points can index their associated geohashes automatically, but more
28
-
important, they can also index all geohash _prefixes_. Indexing the location
29
-
of the entrance to Buckingham Palace--latitude `51.501568` and longitude
30
-
`-0.141257`—would index all of the geohashes listed in the following table,
31
-
along with the approximate dimensions of each geohash cell:
4
+
http://en.wikipedia.org/wiki/Geohash[Geohashes] 是一种将经纬度坐标( `lat/lon` )编码成字符串的方式。((("geohashes")))((("latitude/longitude pairs", "encoding lat/lon points as strings with geohashes")))((("strings", "geohash")))这么做的初衷只是为了让地理位置在 url 上呈现的形式更加友好,但现在 geohashes 已经变成一种在数据库中有效索引地理坐标点和地理形状的方式。
0 commit comments