Geohash icon

Geohash

Encode and decode Geohashes using latlon-geohash

Get Neighbours

AI-generated

Summary

Returns all eight adjacent geohash cells to a specified geohash string.

Inputs

  • geohash (required) — The geohash string to find neighbours for.

Output shape

A single record containing an object of eight neighbouring geohashes (keys: n, ne, e, se, s, sw, w, nw).

If the input geohash is invalid, the operation throws an error. The returned geohashes are lowercased.

Examples

Example 1: Find adjacent cells for a specific geohash.

Input: '9q8y'; Output: { n: '9q8z', ne: '9q8x', ... }

Links

Discussion