超快地球物理坐标的数据库服务器
- 1 min介绍
earth-server是一个基于谷歌S2类库实现的,地球经纬度算法数据库。目前支持如下功能:
- 向数据库中增加、删除对象
- 搜索指定位置最近的若干个坐标标识。
- 以守护进程方式启动
编译
git clone https://github.com/guohai163/earth-server.git
cd earth-library
mkdir build
cd build
cmake ..
make
./earth-library
命令
- add 存储一个新坐标点
add <key> <Latitude> <Longitude>\r\n
- get 搜索某一位置最近N个节点
get <Latitude> <Longitude> <queryNumber>\r\n
- delete 删除一个坐标点
delete <key> <Latitude> <Longitude>\r\n
- search 搜索某一位置周边指定秘书的结果集
search <Latitude> <Longitude> <queryMeter>\r\n