如何通过将最短路径分成几个距离来找到纬度和经度

How to find lat and long by splitting shortest path into several distances

说,我使用 osmnx 最短路径找到了从 start_node 到 end_node 的最短 path/route。这是示例代码:

route = nx.shortest_path(g, start_node, end_node, weight='length')
shortest_dist = nx.shortest_path_length(g, start_node, end_node, weight='length')

原来距离是934米。这是它在图中的样子:

如何获取最短路线每 100 米的经纬度坐标。

您可以采用路线的几何形状,然后沿其插入点:https://osmnx.readthedocs.io/en/stable/osmnx.html#osmnx.utils_geo.interpolate_points