Tools for Geohash Creation and Manipulation

Provides tools to encode lat/long pairs into geohashes, decode those geohashes, and identify their neighbours.

A package for encoding, decoding and neighbouring geohashes

Author: Oliver Keyes
License: MIT
Status: Stable

Travis-CI Build Status CRAN_Status_Badge downloads


geohashes are a way of representing latitude/longitude pairs as individual, short strings of numbers and letters. The geohash package provides tools for:

  • Encoding latitude/longitude pairs into geohashes;
  • Decoding geohashes into latitude/longitude pairs;
  • Identifying the neighbouring geohashes of a provided geohash (or vector of geohashes).

For more information, see the geohash vignette.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.


To get the development version (currently recommended):


The latest CRAN version can be obtained via:



Version 0.3.0

  • The international dateline no longer snarls up hash generation, decoding and comparison (#7, thanks to Seth Wenchel for the report and fix)

  • Function registration is integrated

Version 0.2.0


  • gh_encode has a default precision of 6, errors on negative precision values, and falls back to 10 for >10 values. (#4)
  • geohash now works under gcc 7.1 (#6)

Version 0.1.2


  • Longitudes are now correctly returned from gh_decode (thanks to Alun Hewinson for spotting this) (#1)

Version 0.1.1

  • Initial release

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.3.0 by Oliver Keyes, 9 months ago

Report a bug at

Browse source code at

Authors: Oliver Keyes [aut, cre], Seth Wenchel [ctb], G. Nagel [cph]

Documentation:   PDF Manual  

MIT + file LICENSE license

Imports Rcpp

Suggests testthat, knitr, rmarkdown, olctools

Linking to Rcpp

See at CRAN