【文件属性】:
文件名称:pygeohash:用于与Geohash进行交互的Python模块
文件大小:16KB
文件格式:ZIP
更新时间:2021-05-09 04:31:36
Python
pygeohash
Pygeohash是一个Python模块,它提供了一些功能,可用于对纬度和经度坐标之间的地理哈希值进行解码和编码,并对它们进行基本的计算和近似。
它基于LeonardNorrgård的模块,但旨在在支持python 3的同时添加更多功能。
用法
要使用pygeohash:
import pygeohash as pgh
pgh.encode(42.6, -5.6)
# >>> 'ezs42e44yx96'
pgh.encode(42.6, -5.6, precision=5)
# >>> 'ezs42'
pgh.decode('ezs42')
# >>> ('42.6', '-5.6')
pgh.geohash_approximate_distance('bcd3u', 'bc83n')
# >>> 625441
安装
Pygeohash在python stdli
【文件预览】:
pygeohash-master
----setup.py(950B)
----.gitignore(714B)
----requirements.txt(0B)
----.travis.yml(232B)
----MANIFEST.in(17B)
----CONTRIBUTING.md(236B)
----CHANGELOG.md(400B)
----setup.cfg(64B)
----README.md(2KB)
----tests()
--------__init__.py(28B)
--------test_geohash.py(2KB)
----pygeohash()
--------__init__.py(656B)
--------distances.py(2KB)
--------stats.py(2KB)
--------geohash.py(4KB)
----docs()
--------Makefile(7KB)
--------source()