Build a Geohash Encoder

bit interleaving into base32 cells

Challenge 7 of Indexes & StructuresIntermediate~50 min

Turn a latitude/longitude into a short string that encodes location AND proximity, nearby places share a prefix. Interleave lat/lon bits, encode to base32, decode back to a bounding box and center, and compute neighboring cells. The spatial index behind 'find things near me'.

5 steps

  1. 1Interleaving Bits
  2. 2Base32 Encoding
  3. 3Decoding to a Box
  4. 4The Center Point
  5. 5Neighboring Cells
Start step 1