附近的土桥
proximityhash的Python项目详细描述
邻近HASH:Geohashes接近(用Georaptor压缩的选项)
geohash是gustavo niemeyer发明的一个地理编码系统,被置于公共领域。它是一个层次结构 空间数据结构将空间细分为网格形状的桶,这是 所谓的z阶曲线,通常是空间填充曲线。
^ {STR 1 } $接近HASH 生成一组覆盖中心区域和半径的GHHASH,覆盖圆形区域。 它还有一个附加选项,可以使用georaptor来创建跨各种类型的geohash的最佳组合 代表圆的级别,从最高级别开始迭代,直到酿制出最佳混合。结果 精度与起始geohash级别的精度相同,但数据大小会大大减小,从而提高 速度和性能。
使用量
$ 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
安装
安装近邻散列,简单地说:
$ pip install proximityhash
许可证:
在2.0版apache许可下授权。
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.
贡献者:
- 阿什温·奈尔[https://github.com/ashwin711]
- 阿琼·梅农-[http://github.com/arjunmenon92]