当前位置:网站首页>Baidu map eagle eye track service
Baidu map eagle eye track service
2022-07-23 09:52:00 【Fantasia of the cat】
Here's the catalog title
Baidu map eagle eye track service
Overview of eagle eye track service :
- Eagle eye is a track management service , Provide each end SDK and API Portable access for developers , Track the vehicles managed / People and other moving objects .
- Based on the interface and cloud services provided by eagle eye , Developers can quickly build a complete set of your own 、 Accurate and high-performance trajectory management system , It can be applied to fleet management 、 Personnel management and other fields . file :https://lbsyun.baidu.com/index.php?title=yingyan
- The basic functions are : Trajectory tracking 、 Track storage 、 Track query 、 Track correction and mileage calculation 、 Spatial search 、 Geographical fence monitoring 、 Trajectory analysis, etc .

Basic concept of eagle eye trajectory service :
- service
One service( That is, eagle eye service track ) Corresponding to a trajectory management system , One service It can manage multiple terminal devices ( namely entity),service The unique identifier of is service_id. - entity
One entity Represents a terminal device tracked in reality , It can be a person , A car or any moving object . The same service in ,entity With entity_name As a unique identifier - track
entity The continuous trajectory generated by the movement is called track,track By a series of trajectory points (point) form . - fence
fence Geographic fence , It refers to a certain range ( Such as : circular 、 polygon 、 linear 、 Administrative region ) Virtual geographical area , Eagle eye will automatically push the alarm to the developer . After the developer receives the alarm , Business processing . - More about :https://lbsyun.baidu.com/index.php?title=yingyan/guide/concept
Permissions and quotas :
- Description of the permission of eagle eye developer
- data storage :
- Developers can upload track data to their eagle eye service .
- Eagle eye will store the latest for developers 1 Track data of .
- If you need to keep 1 Track data beyond years , You need to query or export data for self storage .
- The data access :
- The eagle eye service created by the developer can be used by ak visit , Unless authorized by the developer , Otherwise, it cannot be accessed by other developers .
- Eagle eye track management console provides authorization function , Support developers to own service Authorize other developers to access .

Create eagle eye service :
- To use eagle eye tracking service, you first need to create service, Used to store 、 Access and manage your own batch of terminals and tracks .
- Service management system :https://lbsyun.baidu.com/trace/admin/service
- Every service It can manage at most 100 Ten thousand terminals ( people 、 Vehicle, etc. ), A developer can create at most 10 individual service.
- Each developer has more than 100 Wan's terminal , You can create multiple service Manage separately .

Access to services id:

Terminal management :
- The terminal management interface mainly realizes :entity The creation of 、 to update 、 Delete 、 Inquire about .
- for example : Add a riding route 、 Delete cycling route 、 Update the attribute information of the riding route ( Such as : The name of the riding route ) etc. .
- file :https://lbsyun.baidu.com/index.php?title=yingyan/api/v3/entity
- entity Management class interface implementation entity The creation of 、 to update 、 Delete 、 Inquire about . Include 4 Interface :

add to entity:
/** * The new entity */
@Test
public void testEntityAdd(){
String url = "http://yingyan.baidu.com/api/v3/entity/add";
// Create entities
String body = HttpRequest.post(url)
.form("ak", ak)
.form("service_id", 233718)
.form("entity_name", "route_1_1001")
.form("entity_desc", " user 1 Created 1001 Route ")
.execute().body();
System.out.println(body);
}

add to entity Custom field :



to update entity Custom field :
/** * to update entity */
@Test
public void testUpdateEntity(){
String url = "http://yingyan.baidu.com/api/v3/entity/update";
// Create entities
String body = HttpRequest.post(url)
.form("ak", ak)
.form("service_id", 233718)
.form("entity_name", "route_1_1001")
.form("entity_desc", " user 1 Created 1001 Route ")
.form("route_name"," The route from Beijing West Railway Station to Tiananmen Square ")// Custom field
.execute().body();
System.out.println(body);
}

Delete entity:


Inquire about entity:
/** * Inquire about entity */
@Test
public void testEntityList(){
String url = "http://yingyan.baidu.com/api/v3/entity/list";
// Create entities
String body = HttpRequest.get(url)
.form("ak", ak)
.form("service_id", 233718)
.form("filter", "entity_names:route_1_1001")
.form("coord_type_output","gcj02") // Return to the coordinate system
.execute().body();
System.out.println(body);
}

Track upload :
Single point trajectory upload :
/** * For one entity Upload a track point */
@Test
public void testEntityAddpoint(){
String url = "http://yingyan.baidu.com/api/v3/track/addpoint";
// Create entities
String body = HttpRequest.post(url)
.form("ak", ak)
.form("service_id", 233718)
.form("entity_name", "route_1_1001")
.form("latitude",31.041452) // latitude
.form("longitude",121.618723) // longitude
.form("loc_time",System.currentTimeMillis()/1000) // Locate timestamp , Accurate to seconds
.form("coord_type_input","bd09ll") // Coordinate type
.form("speed",10.23) // Speed
.form("direction",15) // Direction
.execute().body();
System.out.println(body);
}
You can see that the coordinate data has been uploaded to Baidu map service :
Batch track upload :
/** * Batch add track points */
@Test
public void testEntityAddpoints(){
String url = "http://yingyan.baidu.com/api/v3/track/addpoints";
List<Object> pointList = new ArrayList<>();
pointList.add(MapUtil.builder().put("entity_name", "route_1_1001")
.put("latitude",31.04122) // latitude
.put("longitude",121.616163) // longitude
.put("loc_time",System.currentTimeMillis()/1000) // Locate timestamp , Accurate to seconds
.put("coord_type_input","bd09ll") // Coordinate type
.put("speed",10.23) // Speed
.put("direction",15).build()); // Direction
pointList.add(MapUtil.builder().put("entity_name", "route_1_1002")
.put("latitude",31.04219) // latitude
.put("longitude",121.614618) // longitude
.put("loc_time",System.currentTimeMillis()/1000) // Locate timestamp , Accurate to seconds
.put("coord_type_input","bd09ll") // Coordinate type
.put("speed",10.23) // Speed
.put("direction",15).build()); // Direction
// Create entities
String body = HttpRequest.post(url)
.form("ak", ak)
.form("service_id", 233718)
.form("point_list", JSONUtil.toJsonStr(pointList))
.execute().body();
System.out.println(body);
}
We can upload multiple track points to Baidu map , Check its track on the map :
/** * For one entity Upload a track point ( Simulate user riding operation ) */
@Test
public void testEntityAddpoint2(){
String url = "http://yingyan.baidu.com/api/v3/track/addpoint";
String point = "121.61931,31.041449|121.618851,31.041441|121.617953,31.041363|121.617531,31.041286|121.617531,31.041286|121.616444,31.041232|121.617378,31.045989";
StrUtil.split(point,'|').forEach(pointStr -> {
String[] splitStr = StrUtil.splitToArray(pointStr, ',');
// Create entities
String body = HttpRequest.post(url)
.form("ak", ak)
.form("service_id", 233718)
.form("entity_name", "route_1_1003")
.form("latitude", Convert.toDouble(splitStr[1])) // latitude
.form("longitude",Convert.toDouble(splitStr[0])) // longitude
.form("loc_time",System.currentTimeMillis()/1000) // Locate timestamp , Accurate to seconds
.form("coord_type_input","bd09ll") // Coordinate type
.form("speed",10.23) // Speed
.form("direction",15) // Direction
.execute().body();
System.out.println(body);
try {
Thread.sleep(RandomUtil.randomInt(5,30)*1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
});
}
Query the track according to time :

/** * Track query and deviation correction */
@Test
public void testEntityGetTrack(){
String url = "http://yingyan.baidu.com/api/v3/track/gettrack";
Long startTime = DateUtil.parse("2022-07-22 00:00:00").getTime() /1000 ;
Long endTime = DateUtil.parse("2022-07-22 23:59:59").getTime() /1000 ;
// Create entities
String body = HttpRequest.get(url)
.form("ak", ak)
.form("service_id", 233718)
.form("entity_name", "route_1_1003")
.form("start_time",startTime) // Starting time
.form("end_time",endTime) // End time
.form("is_processed",1) // Whether to return to the track after correction
.execute().body();
System.out.println(body);
}

Detailed explanation of Baidu map eagle eye track service , For reference only .
边栏推荐
- [ssm] exception handling
- PNA modified polypeptide BZ Val Gly Arg PNA | BOC Val Leu Gly Arg PNA
- PNA PNA modified polypeptide Pro Phe Arg PNA (s-2302) | DNP Gly x l Pro Gly PNA
- 31岁才转行程序员,目前34了,我来说说我的经历和一些感受吧...
- 本地提权的学习
- Read-committed has no interval lock
- 每周推荐短视频:为什么会写这样一本书?
- Judge whether the two types are the same
- I want to learn financial management in digging money. Is it safe to open an account?
- insert引起的db file sequential read之改善
猜你喜欢

Judge whether the two types are the same

PNA肽核酸修饰多肽Pro-Phe-Arg-pNA (S-2302)|Dnp-Gly-X-L-Pro-Gly-pNA

Airiot Q & A issue 5 | how to use low code business flow engine?

清华、AIR、腾讯 | 3D等变分子图预训练

Q-Vision+Kvaser CAN/CAN FD/LIN总线解决方案

Installation, configuration and use of sentry

Q-vision+kvaser can/can fd/lin bus solution

Adas test plan

WordPress网站SEO完整教程

pycharm安装库的时候报错Try to run this command from the system terminal. Make sure that you use the correct
随机推荐
Q-Vision+Kvaser CAN/CAN FD/LIN总线解决方案
LeetCode 提供的main函数中 JsonArray 所使用的jar包
权限系统就该这么设计,yyds
Ardunio——ULN2003驱动板和直流电机风扇——控制风扇转速
肽核酸偶联多肽Ile-Glu-Gly-Arg-pNA (S-2222)|Boc-Leu-Gly-Arg-PNA
canal 第四篇
Matplotlib保存图片到文件
How to preserve peptide nucleic acid | peptide nucleic acid containing azobenzene unit (n-pna) | 99Tcm labeled c-myc mRNA
nchar字符引起的ora-12899错误
Canal Chapter 7
Is it safe to apply for a stock trading account and open an account on your mobile phone?
RESTful是什么
C——结构体
Tensorflow 2.0深度学习教程
Use recursive string inversion and Full Permutation
Canal Chapter 4
PNA specification information | soybean peroxidase labeled PNA (peptide nucleic acid, PNA)
本地提权的学习
PHP RSA 生成公钥私钥 PSA2 加密解密
Canal Chapter 6