Skip to content

About

Proximity searches using geohashes

Resources

Stars

0 stars

Watchers

11 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

Repository files navigation

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

About

Proximity searches using geohashes

Resources

Stars

0 stars

Watchers

11 watching

Forks

Releases

Packages

Used by

Contributors

Languages