python geohash压缩工具
georaptor的Python项目详细描述
georaptor:python geohash压缩工具
geohash是gustavo niemeyer发明的一个地理编码系统,被置于公共领域。它是一种层次化的空间数据结构,将空间划分为网格形状的桶,是z阶曲线和一般空间填充曲线的众多应用之一。
在给定精度级别为多边形创建geohash可能会导致大量geohash。
georaptor通过从最高级别开始迭代直到酿制出最佳混合,创建跨不同级别的geohash的最佳组合来表示多边形。结果精度与初始geohash级别相同,但对于大型多边形,数据大小会显著减小,从而提高速度和性能。
以下是georaptor的工作示例
输入:1096个地理哈希,精度6,新加坡。
输出:414个混合精度为5和6的geohash。
性能
输入样本大小:18992425
输出:220375
总执行时间:35.8013219833秒
使用量
$georaptor<;输入>;–输出<;输出>;–最小级别<;最小级别>;–最大级别<;最大级别>;
示例
$georaptor sample.csv
或
$georaptor sample.csv–输出sample_out.csv–最小级别3–最大级别4
安装
要安装georaptor,只需:
$ pip install georaptor
许可证:
在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.