Geohash icon

Geohash

Encode and decode Geohashes using latlon-geohash

Get Adjacent

AI-generated

Summary

Returns the geohash code of the adjacent grid cell in the specified direction (North, South, East, or West).

Inputs

  • geohash (required) — The geohash string to find the adjacent cell for.
  • direction (required) — The direction to move to the adjacent cell: North (n), South (s), East (e), or West (w).

Output shape

A single record containing the adjacent geohash string in a 'geohash' field.

If a geohash is invalid, throws an error. If the direction is invalid, throws an error.

Examples

Example 1: Find the geohash immediately to the east of a given location.

Input geohash: 'dr5reg'; Direction: 'e'

Links

Discussion