Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wdm0006/pygeohash
Python module for interacting with geohashes
https://github.com/wdm0006/pygeohash
Last synced: 21 days ago
JSON representation
Python module for interacting with geohashes
- Host: GitHub
- URL: https://github.com/wdm0006/pygeohash
- Owner: wdm0006
- Created: 2016-01-07T16:27:10.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-07-28T00:16:31.000Z (4 months ago)
- Last Synced: 2024-10-04T10:49:44.835Z (about 1 month ago)
- Language: Python
- Size: 64.5 KB
- Stars: 151
- Watchers: 6
- Forks: 25
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
pygeohash
=========[![Coverage Status](https://coveralls.io/repos/wdm0006/pygeohash/badge.svg?branch=master&service=github)](https://coveralls.io/github/wdm0006/pygeohash?branch=master) ![travis status](https://travis-ci.org/wdm0006/pygeohash.svg?branch=master)
Pygeohash is a Python module that provides functions for decoding and encoding geohashes to and from latitude and
longitude coordinates, and doing basic calculations and approximations with them.It is based off of Leonard Norrgård's [geohash](https://github.com/vinsci/geohash) module, but aims to add more
functionality while supporting python 3 as well.Usage
=====To use pygeohash:
```py
import pygeohash as pghpgh.encode(latitude=42.6, longitude=-5.6)
# >>> 'ezs42e44yx96'pgh.encode(latitude=42.6, longitude=-5.6, precision=5)
# >>> 'ezs42'pgh.decode(geohash='ezs42')
# >>> ('42.6', '-5.6')pgh.geohash_approximate_distance(geohash_1='bcd3u', geohash_2='bc83n')
# >>> 625441pgh.get_adjacent(geohash='kd3ybyu', direction='right')
# >>> kd3ybyv
```Installation
============Pygeohash has no requirements outside of the python stdlib, and aims to keep it that way if at all possible. To install:
pip install pygeohash
License
========A portion of this codebase (geohash.py), is from Leonard Norrgard's module, which carries the following license:
Copyright (C) 2015 [Leonard Norrgard]([email protected])
Geohash is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.Geohash is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
License for more details.You should have received a copy of the GNU Affero General Public
License along with Geohash. If not, see
[gnu.org](http://www.gnu.org/licenses/).This derivative work likewise carries the same license:
Copyright (C) 2015 [Will McGinnis]([email protected])