根据GPS位置确定路径用户 [英] Determining path user is on based on GPS location

查看:143
本文介绍了根据GPS位置确定路径用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个应用程序,它利用GPS信息来确定用户所在的道路/线索(或OpenStreetMaps术语中的路径)。 OSM中的方法不包括宽度信息,只是连接在一起的一系列点,所以它不是要确定GPS坐标是在哪个多边形框中。

我所掌握的信息是定义线索弯曲时的点的列表(如果它只是一条直线,可能相隔1/2英里)。这些路径通常由树状线(相隔50至300米)分隔开来,并且在公园内可以有很多这样的路径,所以在边缘情况下没有宽度信息的精度可能会非常棘手。通常,路径定义沿着路径的中心。



好像我需要计算路径上的所有单个向量,然后找到最接近的向量。我担心这种情况会与每次新的GPS更新(每隔1-4秒?)密切相关。我至少可以尝试填充每条线索上的点数(每x米强制一个点),然后在GPS更新时获得最近点。



是否有任何结构可以将点数据预先调整为辅助计算?任何其他已知的算法来解决这个问题,这是移动的,违反友好?看起来像这应该是一个已经解决的问题。

解决方案

这就解决了,它被称为Map Matching。

我已经编写了这样的收费系统。有些变体涉及到实时匹配,比如在导航系统中,或者像我的非实时类型,用于后期处理GPS数据。

但是在任何情况下,它至少需要一个月的时间来开发。 p>

如果您有两条路径分叉在两条路径上,事情就会变得困难。

如果匹配错误路径时没有问题在这种情况下,您可以简单地搜索最近的一个。



为了避免CPU功耗过高,请使用地理空间索引,如四叉树或kd树。 / p>

I'm writing an app that takes advantage of GPS information to determine what road/trail (or "way" in OpenStreetMaps terms) a user is on. Ways in OSM do not include width information, just a series of points connected together, so it isn't a matter of figuring out which poly box a GPS coordinate is in.

The information I have is the list of points that define the trail as it bends (if it was just a straight trail, could be 2 points 1/2 mile apart). These trails are usually separated by tree-lines (say 50-300m apart) and there can be lots of them within a park so accuracy without width information can be tricky in edge cases. Usually the way definition runs down the center of the trail.

It seems like I need to calculate all the individual vectors on a trail, then find the nearest vector. I'm concerned about this being rather intensive to do with every new GPS update (every 1-4 seconds?). I could at least try to fill out the points on each trail (force a point every x meters) ahead of time and then just get nearest point as the GPS updates.

Are there any structures that the point-data could be adapted into up-front to assist in the calculations? Any other known algorithms to solve this problem that are mobile-contraint-friendly? Seems like this should be an already-solved problem.

解决方案

This is solved, it is called Map Matching.
I have written such a system for tolling purpose. There are variants related to be real time matching, like in navigation systems, or non real time like mine for post processing GPS data.
But in every case it is at least some month of developing effort.

Things start to get difficult if you have one trail which forks in two paths.
If you don't have a problem when the wrong path is matched in such situations, you can simply search the nearest one.

To avoid to much CPU power use a geo spatial index, like quad tree or k-d tree.

这篇关于根据GPS位置确定路径用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆