cevin/geohash
最新稳定版本:1.0
Composer 安装命令:
composer require cevin/geohash
包简介
Geohash library for php
关键字:
README 文档
README
What's GeoHash
LINK: http://en.wikipedia.org/wiki/Geohash
Usage
use Cevin\Geohash; $length = 6; $geohash = new Geohash(); $hash = substr($geohash->encode('latitude','longitude'), 0, $length); $box = $geohash->neighbors($hash); $box[] = $hash; $in_str = "'".implode("','", $box)."'"; // PHP // $sql = "SELECT FROM `table` WHERE LEFT(geohash, {$length}) IN ($in_str)"; // echo $sql; // OUTPUT // SELECT FROM `table` WHERE LEFT(geohash, 6) IN ('xxxxxx','aaaaaa', ......)
License
统计信息
- 总下载量: 2.02k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 21
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-04-26