Graphhopper灵活的路由忽略街道路段

Graphhopper灵活的路由忽略街道路段

本文介绍了Graphhopper灵活的路由忽略街道路段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经阅读了很多有关灵活查询的信息,但不幸的是,我还没有找到满意的东西.

I've read alot about flexible queries but unfortunatelly I couldn't find something satisfying yet.

我希望路由算法忽略街道段,因为它已被淹没或损坏.这可能吗(也许是通过将geopoints放入GHRequest中)?如果是,那么实施的最佳实践是什么?

I want the routing algorithm to ignore a street segmet, because its flooded or broken. Is that possible (maybe by putting geopoints into the GHRequest)? If it is, what is the best practice for the implementation?

更新:我是否需要创建自定义权重并设置从OpenStreetMap.org获得的forbiddenEdges?

update:Do i need to create a custom Weighting and set the forbiddenEdges which i get out of OpenStreetMap.org?

感谢答案

推荐答案

是的,当您提供GraphHopper edgeID(!= OSM ID)时,当前需要自定义权重.通过LocationIndex.findClosest获取这些edgeID.

Yes, a custom Weighting is currently necessary where you feed GraphHopper edgeIDs (!= OSM IDs). Get these edgeIDs via LocationIndex.findClosest.

如果您想通过Web API来解决这个问题,请创建一个问题.

Please create an issue if you want to have this via web API.

这篇关于Graphhopper灵活的路由忽略街道路段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 22:47