地图匹配实验(一)

地图匹配实验(一)

Hadoop实现出租车轨迹数据的并行地图匹配,此次地图匹配采用的是地图分块,然后通过添加路网骨干节点建立路网索引,为轨迹点映射路网骨干节点缩小范围,提高检索的效率,轨迹点与路网节点之间距离小于阈值就进行匹配。本次路网数据是上海市路网数据,从osm开源地图下载,进行了预处理得到路网骨干节点,使用的出租车数据是上海市4千辆出租车24个小时(07年2月20日)的行驶数据(下载链接)。
Hadoop版本:2.6.0 ;路径: /usr/local/hadoop
sqoop教程
sqoop安装@厦门大学数据库实验室
Mysql安装@厦门大学数据库实验室
Linux:mysql安装,mysql字符编码修改,及mysql-front安装和使用
Linux系统MySQL开启远程连接

关于window远程连接 linux虚拟机mysql server的解决方案

(1)防火墙未关闭,(2)3306端口未对外开放,(3)root用户仅仅只能在本地访问MySQL服务,(4)没有授权。这些问题导致一晚上都没有成功在window远程连接linux的mysql server。
我的linux系统本身防火墙是关闭的,后来自己打开了,也是无语了。linux系统应该默认是关闭的,所以这个问题不大,一般不会是这个问题。
主要是后面几个问题,第一个先看看自己的linux的3306端口是否对外开放,可以看看下面博客:在Ubuntu/Linux环境下使用MySQL:开放/修改3306端口、开放访问权限这篇博客应该也解决了后面的【root用户仅仅只能在本地访问mysql服务】问题。还有开放root账户所有权限,能让所有的主机都能登录root账户。

这是我查看的一些资料,应该对你有用:
如何在本地远程连接linux虚拟机上面的mysql

虚拟机linux系统mysql服务和3306端口都已经打开,为什么本地还是不能远程:
连接到自己的集群主节点master,开放权限:

grant all privileges on *.* to 'root'@'%' identified by '123456';(123456是我root的账号密码)
flush privileges;

这里写图片描述
创建一个project数据库,使用Mysql front 连接master的Mysql server:
这里写图片描述
创建表test,用来存放轨迹点映射到路网骨干节点的结果。
这里写图片描述

数据格式说明:


This document describes the format of taxi GPS reports on Feb 20, 2007 in Shanghai, China.
There are seven fields in a single report shown as follows,


第一个字段是出租车的ID号,第二个是时间戳,第三个是经度,第四个是纬度,第五个是速度,第六个是角度,第七个是载客状态。

The first field is the identificaion of this particular taxi, which has been for privacy reasons; the second is the timestamp when this report is sent out; the third and fourth fields are the logitude and latitude of the current location of this taxi, respectively; the fifth is the instantaneous speed of the taxi at this moment; the sixth is the angle from the north in clockwise direction with a unit of 2 degrees, for example, “157” as shown in the above example would be 314 degrees from the north in clockwise direction; the last field is the current status of this taxi, “0” indicates the taxi is vacant, “1” indicates that the taxi has taken passengers for delivery, and all other figures are assigned for vague purposes.

And the bus traces data is on Feb 23, 2007.
样例数据如下:

105,2007-02-20 00:00:48,121.466600,31.220800,  0, 45,0
105,2007-02-20 00:01:17,121.468100,31.221100, 34, 45,0
105,2007-02-20 00:01:33,121.469500,31.221600, 34, 45,0
105,2007-02-20 00:01:49,121.470000,31.221600,  4,112,0
105,2007-02-20 00:02:50,121.469500,31.221500,  0, 22,0

数据来源:车辆运动轨迹数据集

猜你喜欢

转载自blog.csdn.net/zimojiang/article/details/80728115