Skip to main content

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.

Usage

$ 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)

Example

$ proximityhash 48.858156 2.294776 1000 7
https://raw.github.com/ashwin711/proximityhash/master/images/proximityhash.png
$ proximityhash 48.858156 2.294776 2000 7 --georaptor true
https://raw.github.com/ashwin711/proximityhash/master/images/proximityhash_georaptor.png
$ proximityhash 48.858156 2.294776 2000 7 --georaptor true --minlevel 3 --maxlevel 6
https://raw.github.com/ashwin711/proximityhash/master/images/proximityhash_georaptor_limited.png

Installation

To install proximityhash, simply:

$ pip install proximityhash

License:

Licensed under the Apache License, Version 2.0.

 Copyright 2017 Ashwin Nair <https://www.linkedin.com/in/nairashwin7>

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

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Contributors:

Release files for proximityhash 3.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for proximityhash 3.0.1
File Size Uploaded
proximityhash-3.0.1.tar.gz 8.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for proximityhash 3.0.1
File Interpreter ABI Platform
proximityhash-3.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 17.2 kB

Release files / proximityhash-3.0.1.tar.gz

Download URL proximityhash-3.0.1.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d05f173ef7b2cf5d5e1494b850052129217831269f8e4478fb518707ae5483fd
BLAKE2b-256 checksum
How to use checksums
eec7246e3b2a4ed74bd8a224faa6ab954ddb77dcc74fb3cb35907407d1f0ebbf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.2

Release files / proximityhash-3.0.1-py3-none-any.whl

Download URL proximityhash-3.0.1-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1d040f6f7b4d0792a22d771d42b4900ca9092a8e1ebc8ac28a2fe1ad53226b53
BLAKE2b-256 checksum
How to use checksums
c43b5d3b02883caeca7abd7d4ca65bb47082351ade5e70826befedd3c81c3b47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.2

Release history Release notifications | RSS feed

This release

3.0.1 This release

2 release files

3.0.0

2 release files

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page