Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

Geohashes in proximity

Project description

ProximityHash: Geohashes in Proximity (with the option of compression using Georaptor)

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.

ProximityHash generates a set of geohashes that cover a circular area, given the center coordinates and the radius. It also has an additional option to use GeoRaptor that creates the best combination of geohashes across various levels to represent the circle, starting from the highest level and iterating till the optimal blend is brewed. Result accuracy remains the same as that of the starting geohash level, but data size reduces considerably, thereby improving speed and performance.


$ proximityhash -h
usage: proximityhash [-h] [--georaptor GEORAPTOR] [--minlevel MINLEVEL]
                   [--maxlevel MAXLEVEL]
                   latitude longitude radius precision_level

positional arguments:
    latitude              latitude of the center point
    longitude             longitude of the center point
    radius                radius of coverage in metres
    precision_level       geohash precision level

optional arguments:
    -h, --help            show this help message and exit
    --georaptor GEORAPTOR georaptor flag to compress the output (default: false)
    --minlevel MINLEVEL   minimum level of geohash if georaptor set to true(default: 1)
    --maxlevel MAXLEVEL   maximum level of geohash if georaptor set to true(default: 12)


$ proximityhash 48.858156 2.294776 1000 7
$ proximityhash 48.858156 2.294776 2000 7 --georaptor true
$ proximityhash 48.858156 2.294776 2000 7 --georaptor true --minlevel 3 --maxlevel 6


To install proximityhash, simply:

$ pip install proximityhash


Licensed under the Apache License, Version 2.0.

 Copyright 2017 Ashwin Nair <>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.


Project details

Release history Release notifications

This version
History Node


History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
proximityhash-1.0.1.tar.gz (4.7 kB) Copy SHA256 hash SHA256 Source None Jun 16, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page