Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/taogogo/geohash-php-extention

A php extension for geohash conversion, it's writen in C Language, very fast to convert between geohash and coord.(一个转换经纬度和geohash的PHP扩展) - MIT License
https://github.com/taogogo/geohash-php-extention

Last synced: about 1 month ago
JSON representation

A php extension for geohash conversion, it's writen in C Language, very fast to convert between geohash and coord.(一个转换经纬度和geohash的PHP扩展) - MIT License

Awesome Lists containing this project

README

        

geohash-php-extension
=====
## Introduce

geohash is a php extension,it can convert between “longitude and latitude” and "geohash".

geohash是一个用于转换经纬度和geohash的php扩展。

相似的代码,使用扩展进行转换的速度比使用纯php代码快10倍以上。

## Install:
```shell
phpize
./configure
make
make install
echo "extension=geohash.so" >> /etc/php.ini

```

## Example:

Geohash::decode(geohash string);

Geohash::encode(latitude,longtitude);

Geohash::encode(latitude,longtitude,precision=12);

```php

```
## output:

```php
Array
(
[latitude] => 30.635780068114
[longitude] => 104.03160111979
)

wm3yr31d2524

```

##contact
e-mail: love(a)taogogo.info

##docs

google专利: http://www.google.fr/patents/US20130097163

维基百科: http://en.wikipedia.org/wiki/Geohash