Code Monkey home page Code Monkey logo

s2-php-ext's Introduction

s2-php-ext

使用google s2库 计算cellid和getcoving  本扩展需要安装s2geometry库和php-x库, 仅在linux64位

依赖

因为s2geometry是一个c++库,所以使用php-x做php扩展非常nice 本扩展依赖 gflags.so glob.so libs2.so php-x.so

安装

cd s2-php-ext
make 
sudo make install

加载配置

Edit php.ini, add extension=s2.so

测试

php example.php

函数

int s2_cellid(float lat, float lng)
array s2_getcoving(float lat, float lng, float radius, int maxcell)

如果s2geometry编译困难,可使用s2go-php-ext: http://github.com/fieldhood/s2go-php-ext

s2-php-ext's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.