Using OSM node/way id in Graphhopper

纵饮孤独 提交于 2019-12-24 16:36:59

问题


I want to use Graphhopper for routing, by marking start and stop points using their OSM id instead of lat,lon coordinates. Is this possible? Is it also possible to get an edge using its OSM id?

Thanks


回答1:


I do not see the use for GraphHopper, although it can be handy to have for other applications (not sure) but there are drawbacks. E.g. one OSM id matches to a list of edge ids, also the OSM id is not static and therefor not recommended to be used as identifier. E.g. assume the case where ways are merged or splitted.

That being said you would have to store the "OSM_ID to List" relation at import time. E.g. see OSMReader.getOsmIdOfInternalEdge for the opposite Map relation "edgeId to OSM_ID".



来源:https://stackoverflow.com/questions/27058452/using-osm-node-way-id-in-graphhopper

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!