图论在离线地图最短路径计算中的应用
如何利用图论的概念在 Android 离线地图中查找最短路径?我正在使用 osmdroid 库和 mapnik 地图图块来显示地图。我现在的问题是如何根据用户最后已知的位置到目的地绘制和计算地图上的最短路径,并且该线应该沿着道路走。
我可以使用地理坐标吗?
How do I utilize the concept of Graph Theory in finding the shortest path in an offline map in Android? I am using osmdroid library and mapnik map tiles to display a map. My problem right now is how do I drawing and calculating the shortest path on the map basing from the user's last known location to his destination and the line should go along with the roads.
Can I utilize the geocoordinates?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将 GraphHopper (警告:我是开发者)与 mapforge(离线渲染器)。
有了这个 位置到 id 索引,您可以查询现实世界的纬度,经度坐标,您将获得图表的 ID。有了这个id,你可以通过 Graph 接口。
如果您需要更多信息来将其与 Mapforge 集成,请告诉我。对于桌面,已经有 粗略实施。
You can use GraphHopper (warning: I'm the dev) in combination with mapforge (offline renderer).
And with this location to id index you can query real world lat,lon coordinates and you'll get id's of the graph. With that id's you can fetch the real lat,lon via the Graph interface.
Let me know if you need more info for integrating this with mapforge. For the desktop there is alreay a rough implementation.