如何使用OSRM的比对服务 [英] How to use OSRM's match service

查看:153
本文介绍了如何使用OSRM的比对服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如标题中所述:如何使用匹配调用?
我尝试过

As stated in the header: how can I use the match call?
I tried

http://router.project-osrm.org/match/v1/driving/8.610048,46.99917;8.530232,47.051?overview=full&radiuses=49;49

我不确定radiuses的列表是否正确给出. 我无法正常工作.我也尝试了[49;49]{49;49}该命令可用于route:

I am not sure, whether the list of radiuses is given correctly. I can't get it work. I also tried [49;49] or {49;49} The command works with route:

http://router.project-osrm.org/route/v1/driving/8.610048,46.99917;8.530232,47.051?overview=full

有关背景信息,请参见此处

For backround see here

编辑:如果您查看示例

Edit: If you look at the example here, itr seems, the timestamps are not needed /match/v1/{profile}/{coordinates}?steps={true|false}&geometries={polyline|polyline6|geojson}&overview={simplified|full|false}&annotations={true|false}

推荐答案

来自

如果找不到完整的匹配项,则时间戳(> 60s)中的大跳转或不可行的转换会导致跟踪拆分.

Large jumps in the timestamps (> 60s) or improbable transitions lead to trace splits if a complete matching could not be found.

我认为这是您的请求的问题.给定的两个点是60多个appart,OSRM无法成功匹配它们. radiuses已正确指定.

I think that's the problem with your request. The two given points are more than 60s appart and OSRM cannot match them successfully. The radiuses are specified correctly.

以下查询对我有用:

http://router.project-osrm.org/match/v1/driving/8.610048,46.99917;8.620048,46.99917?overview=full&radiuses=49;49

这将返回:

{"tracepoints":[{"location":[8.610971,46.998963],"name":"Alte Kantonstrasse","hint":"GKUFgJEhBwAAAAAAHQAAAAAAAAC5AAAAAAAAAB0AAAAAAAAAuQAAAPsCAACbZIMAsyXNAgBhgwCCJs0CAAAPABki8hY=","matchings_index":0,"waypoint_index":0,"alternatives_count":0},{"location":[8.620295,46.999681],"name":"Schönenbuchstrasse","hint":"nIEFAJ7IFIA3AAAAZAAAAAAAAADYAAAANwAAAGQAAAAAAAAA2AAAAPsCAAAHiYMAgSjNAhCIgwCCJs0CAAAPABki8hY=","matchings_index":0,"waypoint_index":1,"alternatives_count":5}],"matchings":[{"distance":922.3,"duration":114.1,"weight":114.1,"weight_name":"routability","geometry":"onz}Gqyps@Wg@S_@aCaFMUYo@c@w@OKOCWmAWs@aBiDsAsCMYH[HY\\_@h@ObBW^w@BQAUKu@ASF[ZaABOFYpAyIf@mD","confidence":0.000982,"legs":[{"distance":922.3,"duration":114.1,"weight":114.1,"summary":"","steps":[]}]}],"code":"Ok"}

因此,两个给定的输入点8.610048,46.999178.620048,46.999178.610971,46.9989638.620295,46.999681匹配.

So the two given input points 8.610048,46.99917 and 8.620048,46.99917 are matched to 8.610971,46.998963 and 8.620295,46.999681.

据我所知,是否要实现 ,则您需要在OSRM上给它们更多的输入点,它们之间的间隔时间应少于60s.

So as far as I can see, if you want to implement something like that, you need to give OSRM more input points on its way which are less than 60s apart.

另请参见此处,以获取有关以下内容的说明: routematch服务之间的区别.

See also here for an explanation about the differences between route and match service.

这篇关于如何使用OSRM的比对服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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