在Graphhopper中使用OSM节点/方式ID [英] Using OSM node/way id in Graphhopper

查看:407
本文介绍了在Graphhopper中使用OSM节点/方式ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Graphhopper进行路由,方法是使用其OSM ID而不是经纬度坐标来标记起点和终点.这可能吗?还可以使用其OSM ID获得优势吗?

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?

谢谢

推荐答案

我看不到GraphHopper的用法,尽管对于其他应用程序可能很方便(不确定),但存在缺点.例如.一个OSM ID与边缘ID列表匹配,而且OSM ID不是静态的,因此不建议将其用作标识符.例如.假设合并或拆分方式.

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.

也就是说,您将必须在导入时存储"OSM_ID到列表"关系.例如.参见OSMReader.getOsmIdOfInternalEdge以获取相反的Map关系"edgeId to OSM_ID".

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".

这篇关于在Graphhopper中使用OSM节点/方式ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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