0.0
No commit activity in last 3 years
No release in over 3 years
Calculates geohashes within a radius from a point
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.3.0
>= 1.8.6
>= 3.6.0, ~> 3.6

Runtime

 Project Readme

ProximityHash: Geohashes in Proximity

Ported from python library here: https://github.com/ashwin711/proximityhash.

Geohash is a geocoding system invented by Gustavo Niemeyer and placed into the public domain. It is a hierarchical spatial data structure which subdivides space into buckets of grid shape, which is one of the many applications of what is known as a Z-order curve, and generally space-filling curves.

Image from original repo to demonstrate output: proximityhash demo image

Usage

require 'proximityhash'

proximity_hash = ProximityHash.new(latitude, longitude, radius, precision_level)
proximity_hash.calculate
  • latitude in decimal degrees
  • longitude in decimal degrees
  • radius in metres
  • precision_level between 1 and 12

Results

A hash of geohash (key) and distance (value) (in metres) ordered by closest to further away.

Build Status

Build Status

LICENCE

Apache 2.0