Repast Simphony 的最短距离?

问题描述

我想在道路网络上获得从 a 点到 b 点的最短距离。有没有办法使用 GeoTools 或其他方式做到这一点?我们可以从道路形状文件创建网络投影吗?

解决方法

Repast API 具有 ShortestPath 函数 (https://repast.github.io/docs/api/repast_simphony/repast/simphony/space/graph/ShortestPath.html),它将提供网络中最短路径的网络边缘列表。

还有一个模型 RepastCity (https://github.com/nickmalleson/repastcity),提供了创建道路网络和路线的示例。

GeoTools API 还提供图形和最短路径功能:https://docs.geotools.org/stable/userguide/extension/graph/index.html