Skip to content

drfonfon/android-geohash

Repository files navigation

Android-Geohash

An implementation of Geohashes in Android. The produced hashes, when using character precision (multiples of 5 bits) are compatible to the reference implementation geohash.org.

Example

  Location location = new Location("geohash");
  location.setLatitude(53.2030476);
  location.setLongitude(45.0324948);
  
  GeoHash hash = GeoHash.fromLocation(location, 9);
  hash.toString(); //"v12n8trdj"