Google maps航点限制 - 从原始GPS数据中准确显示长航线 [英] Google maps waypoints limit - show long routes accurately from raw GPS data

查看:99
本文介绍了Google maps航点限制 - 从原始GPS数据中准确显示长航线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我很清楚这个问题被问了很多次,我花了几天的时间来看看stackoverflow的答案,但找不到解决方法后面的任何内容。问题很简单:我们需要在谷歌地图上显示汽车经过的确切路线(所以,从GPS长/历史数据),路线长达数百甚至数千公里。这意味着我们总是会超过航点限制至少一个数量级(免费8个,溢价25个)。我的直觉告诉我,将批量的GPS定位到8/25批次,以这种方式发送很多请求,然后将所有这些请求合并到道路中,最后将所有这些合并到一条路径中,这是一种疯狂的解决方案。



如果我们在高速公路上,那么它并不是什么大问题,因为快速和预期/计算的路线将起作用,但是如果某条长路线是高速公路的组合,然后我可以想象一个实际的(从原始的GPS数据)和显示的路线之间的巨大差异。



我想知道我是否错过了一些东西?是否有一些更合适的方式来解决这个问题?



PS。
现在我不需要任何代码,只是一个适当的方式来构建这个想法。



谢谢


将几个数字加入混合:
1)平均路线距离约为1800kms
2)原始GPS数量生成的点数大约是15000-18000(每100-150米)
3)路线必须经过的点数(航点)至少为数百,有时为数千(当大多数路线在城市地区)

解决方案

一种可能的解决方案是道路API

相关问题:



问题


  1. Roads API在黄金时段似乎没有准备好(报告问题跟踪器中的结果不一致)


I am well aware that this question was asked many times and i've spent days looking through stackoverflow answers but couldn't find anything that goes behind workarounds.

The problem is pretty simple: we need to show exact routes passed by the car (so, from GPS long/lat history data) on google maps and the routes are hundreds or even thousands kms long. What that mean is that we will always exceed waypoints limits by at least an order of magnitude (8 for free or 25 for premium). My gut is telling me that batching GPS locations to batches of 8/25, sending many requests that way and then snap all of those to roads and at the end merge all together into a single route is a bit wild solution.

If we are on a highway then its not that big problem since snap and expected/calculated route will work but if some long route is a combination of highway but also in-town drive through small streets with alot of turning, then i can imagine huge discrepancy between an actual (from raw GPS data) and shown route.

I am wondering if i am missing something? Is there some 'more proper' way to approach this problem?

PS. I don't need any code at the moment, just a proper way to architecture the idea.

Thanks

[UPDATE] To put a few numbers into the mix: 1) average route distance is about 1800kms 2) number of raw GPS points generated is about 15000-18000 (every 100-150 meters) 3) number of points that the route must go through (waypoints) is in at least in hundreds and sometimes in thousands (when most of the route is in urban areas)

解决方案

One possible solution is the Roads API.

Related questions:

Issues

  1. The Roads API doesn't seem ready for prime time (reports of inconsistent results in the issue tracker)

  2. has a limit of 100 points at a time with a (not documented) recommended maximum separation of 400m (reference a comment under the answer to Google Map Road API not interpolating path and not giving smooth route).

这篇关于Google maps航点限制 - 从原始GPS数据中准确显示长航线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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