Geohashing - System Design
Machine-readable: Markdown · JSON API · Site index
Описание видео
Geohashing is a hierarchical spatial data structure that encodes a geographic location into a short string of letters and digits.
It works by dividing the entire surface of the Earth into a grid of interlocking bounding boxes.
The first character of a geohash determines which of the primary global regions the coordinate falls into.
Each additional character added to the string divides that specific box into a smaller more precise grid.
A longer geohash string means a smaller box and a much more precise geographic location.
For example a geohash with an exact length of twelve characters is accurate down to a few centimeters.
This system converts two-dimensional latitude and longitude coordinates into a single one-dimensional string.
Because it is a single string databases can index and search geohashed locations incredibly fast.
Nearby locations often share the exact same prefix string which makes searching for local points of interest very efficient.
However it can suffer from edge cases where two points are close physically but sit on different sides of a major grid boundary.
Despite this limitation geohashing is a foundational technique used by location-based apps to find nearby drivers or restaurants.