坐标归一化到最近的路线

Normalization of coordinates to closest route

在我的应用程序中,我收到 GPS 坐标,我用它来使用 HEREcalculateRoute 方法和折线绘制路线。但结果很差,而且很少准确,这可能是由于测量精度低。

下图中的这种行为示例 - 实际路线应仅在最大的对角街道上。

所以我想绕过这个问题的想法是首先 'normalize' 这些坐标通过将它们近似到最近的街道。

我的问题是:HERE API 是否提供了这样的方法?如果有,它叫什么? 我搜索了文档并用谷歌搜索但无济于事。

作为最后的手段,我可​​以将我的整个应用程序切换到 Google Maps,我知道它的 API 中有方法可以完全满足我的需要。

如果这能帮助任何人回答这个问题,这里是我绘制这条路线的参数:

    mode: 'fastest;truck',
    representation: 'display',
    routeattributes: 'waypoints,shape,summary',
    maneuverattributes: 'direction',
    waypoints: [/* too much to show here*/],
    avoidLinks: '',
    avoidSeasonalClosures: true,
    alternatives: 1,

HERE 路由匹配API 就是你想要实现的。 查看此开发人员文档:

https://developer.here.com/documentation/route-match/topics/quick-start-gps-trace-route.html