将坐标归一化为最接近的路线 [英] Normalization of coordinates to closest route
问题描述
在我的应用程序中,我收到GPS坐标,该坐标用于使用HERE
的calculateRoute
方法和折线绘制路线.但是结果很差,而且几乎不准确,这可能是由于测量的准确性低所致.
In my application I receive GPS coordinates which I use to draw route using HERE
's calculateRoute
method and polyline. But results are poor and rarely accurate probably due to low accuracy of the measurements.
下图所示的行为示例-实际路线应仅在最大的对角街道上.
所以我要解决此问题的想法是,首先通过将它们近似到最近的街道来标准化"这些坐标.
So my idea to circumvent this problem is to first 'normalize' these coordinates by approximating them to nearest street.
我的问题是:HERE API
是否提供这种方法?
我已经搜索过文档并在Google上进行搜索,但无济于事.
My question is: does HERE API
provides such method and if so what it is called?
I have searched documentation and googled for it but to no avail.
作为最后的选择,我可以将整个应用程序切换到Google Maps
,我知道该应用程序的API中的方法可以完全满足我的需要.
As a last resort I can switch my whole app to Google Maps
which I know that have the method in its API to do exactly what I need.
如果这可以帮助任何人回答此问题,请使用以下参数来绘制此路线:
If this will help anyone to answer this question, here are my parameters for drawing this route:
mode: 'fastest;truck',
representation: 'display',
routeattributes: 'waypoints,shape,summary',
maneuverattributes: 'direction',
waypoints: [/* too much to show here*/],
avoidLinks: '',
avoidSeasonalClosures: true,
alternatives: 1,
推荐答案
此处的路线匹配API适用于您要实现的目标. 查看此开发人员文档:
The HERE Route matching API is for what you want to achieve. Check out this developer documentation:
https://developer .here.com/documentation/route-match/topics/quick-start-gps-trace-route.html
这篇关于将坐标归一化为最接近的路线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!