围栏管理类接口从功能上区分为两类接口:
1、管理围栏属性接口:管理围栏自身属性的变化,包括创建围栏、更新围栏形状、删除围栏、查询围栏自身属性信息。支持设置监控一个service下的所有围栏。支持以下类型的围栏
1)圆形
2)多边形
3)路线
4)行政区
2、管理围栏监控对象接口:管理围栏的监控对象,包括:
1)添加监控对象
2)删除监控对象
3)查询监控对象
地理围栏的使用方法详见:开发指南--地理围栏
目前中国主要有以下三种坐标系:
WGS84:为一种大地坐标系,也是目前广泛使用的GPS全球卫星定位系统使用的坐标系
GCJ02:是由中国国家测绘局制订的地理信息系统的坐标系统。由WGS84坐标系经加密后的坐标系
BD09:为百度坐标系,在GCJ02坐标系基础上再次加密。其中bd09ll表示百度经纬度坐标,bd09mc表示百度墨卡托米制坐标
非中国地区地图,统一使用WGS84坐标
鹰眼 Web服务API v3.0的默认输入输出参数为百度坐标(BD09),同时可通过"coord_type","coord_type_input","coord_type_output"(以各服务参数介绍为准)控制输入输出的坐标类型,鹰眼将自动完成转换。
1、使用鹰眼地理围栏管理接口创建或修改围栏时,请注意正确填写参数中的经度和纬度,如圆形围栏创建的参数longitude、latitude;多边形围栏创建的参数vertexes等(以各服务参数介绍为准)。
2、如创建时坐标中经度和纬度的顺序不正确,则不能成功创建和修改围栏。
以中心点和半径创建一个圆形围栏。
支持三种监控模式:
1、监控一个entity的围栏
2、监控多个entity的围栏
3、监控service下的所有entity围栏
https://yingyan.baidu.com/api/v3/fence/createcirclefence
//POST请求

{"status": 0,"message": "成功","fence_id":1}
以多边形形状点创建多边形围栏。
支持三种监控模式:
1、监控一个entity的围栏
2、监控多个entity的围栏
3、监控service下的所有entity围栏
https://yingyan.baidu.com/api/v3/fence/createpolygonfence
//POST请求

{"status": 0,"message": "成功","fence_id":2}
以路线形状点创建线型围栏。
支持三种监控模式:
1、监控一个entity的围栏
2、监控多个entity的围栏
3、监控service下的所有entity围栏
https://yingyan.baidu.com/api/v3/fence/createpolylinefence
//POST请求

{"status": 0,"message": "成功","fence_id":3}
以行政区划关键字创建围栏。
1. 若关键字匹配至唯一的行政区划,则将创建该围栏
2. 若关键字匹配至多个行政区划,则围栏创建失败,将返回匹配的行政区划名称列表
支持三种监控模式:
1、监控一个entity的围栏
2、监控多个entity的围栏
3、监控service下的所有entity围栏
https://yingyan.baidu.com/api/v3/fence/createdistrictfence
//POST请求

若行政区关键字匹配到唯一的行政区,返回结果示例如下:
{"status": 0,"message": "成功","fence_id":1,"district":"北京市海淀区"}
若行政区关键字匹配到多个的行政区,返回结果示例如下:
{"status": 5108,"message": "围栏创建失败,该关键字匹配了多个行政区,请输入明确的行政区关键字","district_list":["北京市朝阳区","辽宁省朝阳市"]
更新圆形围栏
https://yingyan.baidu.com/api/v3/fence/updatecirclefence
//POST请求

{"status": 0,"message": "成功",}
更新多边形围栏
https://yingyan.baidu.com/api/v3/fence/updatepolygonfence
//POST请求

{"status": 0,"message": "成功",}
更新多边形围栏
https://yingyan.baidu.com/api/v3/fence/updatepolylinefence
//POST请求

{"status": 0,"message": "成功",}
更新行政区划围栏
https://yingyan.baidu.com/api/v3/fence/updatedistrictfence
//POST请求

{"status": 0,"message": "成功","district":"北京市海淀区"}
删除围栏
https://yingyan.baidu.com/api/v3/fence/delete
//POST请求

{"status": 0,"message": "成功","fence_ids": [11,12,13,15]}
查询围栏
https://yingyan.baidu.com/api/v3/fence/list
//GET请求

{"status": 0,"message": "成功","size": 2,"fences": [{"fence_id": 2,"fence_name": "站点1","monitored_person": "小明","shape": "circle","longitude": 116.236253,"latitude": 39.746539,"radius": 500,"denoise": 100,"create_time": "2017-03-15 15:56:24","modify_time": "2017-03-15 15:56:24"},{"fence_id": 52,"fence_name": "站点2","monitored_person": “小明”,"shape": "polyline","vertexes":"40.020664,116.351592;40.02083,116.358779;40.018178,116.35885;40.01757,116.350586","denoise":100,"create_time": "2017-03-15 15:59:09","modify_time": "2017-03-15 15:59:09"}]}
针对某一个地理围栏增加entity
https://yingyan.baidu.com/api/v3/fence/addmonitoredperson
//POST请求
删除某一个围栏下的一些entity
https://yingyan.baidu.com/api/v3/fence/deletemonitoredperson
//POST请求
查询某service下的某一个围栏下的所有entity,方便开发者管理查询entity
https://yingyan.baidu.com/api/v3/fence/listmonitoredperson
//GET请求
上一篇
下一篇